summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-06-19 10:44:56 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-06-19 10:45:41 (GMT)
commitfbe0edc109a252efb6f2f53d04537c33f2e91fba (patch)
tree471c1f83dedf4efc1afc09eaa35b1fcc3b744a40 /src/corelib
parent500a851bb363567effca6d78b14a755bf56e37f1 (diff)
downloadQt-fbe0edc109a252efb6f2f53d04537c33f2e91fba.zip
Qt-fbe0edc109a252efb6f2f53d04537c33f2e91fba.tar.gz
Qt-fbe0edc109a252efb6f2f53d04537c33f2e91fba.tar.bz2
Changed enum Qt::Uninitialized to enum Qt::Initialization
enum Qt::Uninitialized contains one value, which is also called Uninitialized. Because the type and the value used the same name, wherever the type Qt::Uninitialized was used in a function signature, you had to include the enum keyword. But qdoc's preprocessor doesn't like that, so you have to take the enum keyword out of the signatures. But then the compiler complains because the type and the value look the same. So I had to change the enum type name to Initialization, so the compiler can distinguish it from the value name. And qdoc likes that too.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/tools/qbytearray.cpp2
-rw-r--r--src/corelib/tools/qbytearray.h2
-rw-r--r--src/corelib/tools/qstring.cpp11
-rw-r--r--src/corelib/tools/qstring.h2
5 files changed, 9 insertions, 10 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 398cd48..2023327 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1543,7 +1543,7 @@ public:
TitleBarArea // For move
};
- enum Uninitialized {
+ enum Initialization {
Uninitialized
};
}
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 2d4010d..5d3386e 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1309,7 +1309,7 @@ QByteArray::QByteArray(int size, char ch)
Constructs a byte array of size \a size with uninitialized contents.
*/
-QByteArray::QByteArray(int size, enum Qt::Uninitialized)
+QByteArray::QByteArray(int size, Qt::Initialization)
{
d = static_cast<Data *>(qMalloc(sizeof(Data)+size));
d->ref = 1;
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 3cb10d7..e494ac1 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -127,7 +127,7 @@ public:
QByteArray(const char *);
QByteArray(const char *, int size);
QByteArray(int size, char c);
- QByteArray(int size, enum Qt::Uninitialized);
+ QByteArray(int size, Qt::Initialization);
inline QByteArray(const QByteArray &);
inline ~QByteArray();
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index dba3d2a..3ff263d 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1012,14 +1012,13 @@ QString::QString(int size, QChar ch)
}
}
-/*!
- Constructs a string of the given \a size without initializing the
- characters. This is only used in \c QStringBuilder::toString().
+/*! \fn QString::QString(int size, Qt::Initialization)
+ \internal
- \internal
+ Constructs a string of the given \a size without initializing the
+ characters. This is only used in \c QStringBuilder::toString().
*/
-
-QString::QString(int size, enum Qt::Uninitialized)
+QString::QString(int size, Qt::Initialization)
{
d = (Data*) qMalloc(sizeof(Data)+size*sizeof(QChar));
d->ref = 1;
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 67716b8..6bb0d8e 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -579,7 +579,7 @@ public:
bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; }
bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; }
- QString(int size, enum Qt::Uninitialized);
+ QString(int size, Qt::Initialization);
private:
#if defined(QT_NO_CAST_FROM_ASCII) && !defined(Q_NO_DECLARED_NOT_DEFINED)