[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:47:32 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d0ed99789b767f5ce7930b4e7f96488c91a891d5
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 27 18:19:49 2001 +0000
Fixes to process for switching use of borrowed strings and kwq strings
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/KWQCString.h b/WebCore/kwq/KWQCString.h
index 8e68252..0448de2 100644
--- a/WebCore/kwq/KWQCString.h
+++ b/WebCore/kwq/KWQCString.h
@@ -75,6 +75,9 @@ public:
uint length() const;
bool truncate(uint);
QCString lower() const;
+ QCString upper() const;
+ QCString left(uint) const;
+ QCString right(uint) const;
QCString mid(uint, uint len=0xffffffff) const;
// operators ---------------------------------------------------------------
diff --git a/WebCore/kwq/KWQCString.mm b/WebCore/kwq/KWQCString.mm
index e38b7a2..a991f07 100644
--- a/WebCore/kwq/KWQCString.mm
+++ b/WebCore/kwq/KWQCString.mm
@@ -206,6 +206,55 @@ QCString QCString::lower() const
return result;
}
+QCString QCString::upper() const
+{
+ QCString result(data());
+
+ char *p = result.data();
+ if (p) {
+ while(*p) {
+ *p = toupper((uchar)*p);
+ p++;
+ }
+ }
+
+ return result;
+}
+
+QCString QCString::left(uint len) const
+{
+ if (isEmpty()) {
+ QCString empty;
+ return empty;
+ }
+ else if (len >= size()) {
+ QCString same(data());
+ return same;
+ }
+ else {
+ QCString s(len + 1);
+ strncpy(s.data(), data(), len);
+ *(s.data() + len) = '\0';
+ return s;
+ }
+}
+
+QCString QCString::right(uint len) const
+{
+ if (isEmpty()) {
+ QCString empty;
+ return empty;
+ }
+ else {
+ uint l = length();
+ if (len > l) {
+ len = l;
+ }
+ char *p = data() + (l - len);
+ return QCString(p);
+ }
+}
+
QCString QCString::mid(uint index, uint len) const
{
uint slen;
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index 6373a5e..958682e 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -128,7 +128,6 @@ public:
class QString {
public:
- static QString fromLatin1(const char *, int len=-1);
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
@@ -139,6 +138,7 @@ public:
// static member functions -------------------------------------------------
static QString number(long, int base=10);
+ static QString fromLatin1(const char *, int len=-1);
// constructors, copy constructors, and destructors ------------------------
@@ -195,13 +195,13 @@ public:
QString arg (int &);
QString arg(int a, int fieldwidth=0, int base=10) const;
- QString arg(const QString &, int fieldwidth = 0) const;
+ QString arg(const QString &, int fieldwidth=0) const;
QString left(uint) const;
QString right(uint) const;
QString mid(int, int len=0xffffffff) const;
- const char* latin1() const;
+ const char *latin1() const;
const char *ascii() const;
const QChar *unicode() const;
QCString utf8() const;
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index ac4c091..29224fc 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -31,6 +31,8 @@
const QString QString::null;
+// constructors, copy constructors, and destructors ------------------------
+
QString::QString()
{
s = NULL;
@@ -96,15 +98,39 @@ QString::~QString()
CFRelease(s);
}
-QString QString::lower() const
+// assignment operators ----------------------------------------------------
+
+QString &QString::operator=(const QString &qs)
{
- QString result(*this);
+ // shared copy
+ CFRetain(qs.s);
+ CFRelease(s);
+ s = qs.s;
+ return *this;
+}
- CFStringLowercase(result.s, NULL);
+QString &QString::operator=(const QCString &qcs)
+{
+ return *this = QString(qcs);
+}
- return result;
+QString &QString::operator=(const char *chs)
+{
+ return *this = QString(chs);
}
+QString &QString::operator=(QChar qc)
+{
+ return *this = QString(qc);
+}
+
+QString &QString::operator=(char ch)
+{
+ return *this = QString(QChar(ch));
+}
+
+// member functions --------------------------------------------------------
+
bool QString::isNull() const
{
return (s == NULL);
@@ -120,42 +146,172 @@ uint QString::length() const
return CFStringGetLength(s);
}
-int QString::find(char, int index=0) const
+bool QString::startsWith(const QString &s) const
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+int QString::toInt() const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+int QString::toInt(bool *b, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+uint QString::toUInt(bool *ok=0, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+long QString::toLong(bool *ok=0, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return 0L;
+}
+
+float QString::toFloat(bool *b=0) const
+{
+ // FIXME: awaiting real implementation
+ return 0.0f;
+}
+
+QString &QString::prepend(const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::append(const char *s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::append(const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+int QString::contains(const char *c, bool cs=TRUE) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+int QString::contains(char c) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::find(const char *, int index=0, bool b=0) const
+int QString::find(char c, int index=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::find(const QString &, int index=0, bool b=0) const
+int QString::find(const char *s, int index=0, bool b=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::find(const QRegExp &, int index=0, bool b=0) const
+int QString::find(const QString &s, int index=0, bool b=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::findRev(char, int index=0) const
+int QString::find(const QRegExp &r, int index=0, bool b=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::findRev(const char *, int index=0) const
+int QString::findRev(char c, int index=0) const
{
// FIXME: awaiting real implementation
return 0;
}
+int QString::findRev(const char *s, int index=0) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+QString &QString::remove(uint u1, uint u2)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::replace(const QRegExp &, const QString &)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::insert(uint i, char c)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+void QString::truncate(uint pos)
+{
+ // FIXME: awaiting real implementation
+}
+
+void QString::fill(QChar c, int len=-1)
+{
+ // FIXME: awaiting real implementation
+}
+
+QString QString::arg(int &a)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::arg(int a, int fieldwidth=0, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::arg(const QString &s, int fieldwidth=0) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::left(uint pos) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::right(uint pos) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::mid(int pos, int len=0xffffffff) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
QString QString::fromLatin1(const char *s, int len=-1)
{
// FIXME: awaiting real implementation
@@ -168,56 +324,79 @@ const char *QString::latin1() const
return (const char *)CFStringGetCStringPtr(s, kCFStringEncodingISOLatin1);
}
+const char *QString::ascii() const
+{
+ // FIXME: awaiting real implementation
+ return NULL;
+}
+
const QChar *QString::unicode() const
{
// FIXME: awaiting real implementation
return (QChar *)CFStringGetCharactersPtr(s);
}
-int QString::contains(const char *s, bool cs=TRUE) const
+QCString QString::utf8() const
{
// FIXME: awaiting real implementation
return 0;
}
-QString QString::mid(int, int len=0xffffffff) const
+QCString QString::local8Bit() const
{
// FIXME: awaiting real implementation
- return NULL;
+ return 0;
}
-QString::operator const char *() const
+QString &QString::setUnicode(const QChar *s, uint i)
{
- return latin1();
+ // FIXME: awaiting real implementation
+ return *this;
}
-QString &QString::operator=(const QString &qs)
+QString &QString::setNum(int i, int base=10)
{
- // shared copy
- CFRetain(qs.s);
- CFRelease(s);
- s = qs.s;
+ // FIXME: awaiting real implementation
return *this;
}
-QString &QString::operator=(const QCString &qcs)
+QString &QString::sprintf(const char *s, ...)
{
- return *this = QString(qcs);
+ // FIXME: awaiting real implementation
+ return *this;
}
-QString &QString::operator=(const char *chs)
+QString QString::lower() const
{
- return *this = QString(chs);
+ // FIXME: awaiting real implementation
+ QString result(*this);
+
+ CFStringLowercase(result.s, NULL);
+
+ return result;
}
-QString &QString::operator=(QChar qc)
+QString QString::stripWhiteSpace() const
{
- return *this = QString(qc);
+ // FIXME: awaiting real implementation
+ return *this;
}
-QString &QString::operator=(char ch)
+QString QString::simplifyWhiteSpace() const
{
- return *this = QString(QChar(ch));
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+void QString::compose()
+{
+ // FIXME: awaiting real implementation
+}
+
+QString QString::visual(int index=0, int len=-1)
+{
+ // FIXME: awaiting real implementation
+ return *this;
}
bool QString::operator!() const
@@ -225,12 +404,35 @@ bool QString::operator!() const
return isNull();
}
+QString::operator const char *() const
+{
+ return latin1();
+}
+
QChar QString::operator[](int i) const
{
// FIXME: awaiting real implementation
return 0;
}
+QString &QString::operator+(char c)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::operator+(QChar c)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::operator+(const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
QString &QString::operator+=(char c)
{
// FIXME: awaiting real implementation
@@ -249,8 +451,33 @@ QString &QString::operator+=(const QString &s)
return *this;
}
+QString::operator QChar() const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+/*
+QString &operator+(const char *s1, const QString &s2)
+{
+ // FIXME: awaiting real implementation
+}
+
+QString &operator+(QChar c, const QString &s)
+{
+ // FIXME: awaiting real implementation
+}
+*/
+
+bool operator==(const QString &s, QChar c)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
bool operator==(const QString &s1, const QString &s2)
{
+ // FIXME: awaiting real implementation
CFComparisonResult cmp;
int flags;
@@ -261,8 +488,27 @@ bool operator==(const QString &s1, const QString &s2)
return (cmp == kCFCompareEqualTo);
}
+bool operator==(const QString &s1, const char *s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+bool operator==(const char *s1, const QString &s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+bool operator!=(const QString &s, QChar c)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
bool operator!=(const QString &s1, const QString &s2)
{
+ // FIXME: awaiting real implementation
CFComparisonResult cmp;
int flags;
@@ -273,6 +519,24 @@ bool operator!=(const QString &s1, const QString &s2)
return (cmp != kCFCompareEqualTo);
}
+bool operator!=(const QString &s1, const char *s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+bool operator!=(const char *s1, const QString &s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+QString operator+(char c, const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
QConstString::QConstString(QChar *qcs, uint len)
{
if (qcs || len) {
diff --git a/WebCore/kwq/qt/_qstring.h b/WebCore/kwq/qt/_qstring.h
index f60f94b..5a83649 100644
--- a/WebCore/kwq/qt/_qstring.h
+++ b/WebCore/kwq/qt/_qstring.h
@@ -45,10 +45,6 @@
// KWQ hacks ---------------------------------------------------------------
-#ifndef USING_BORROWED_QSTRING
-#define USING_BORROWED_QSTRING
-#endif
-
#include <KWQDef.h>
// -------------------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qcstring.h b/WebCore/kwq/qt/qcstring.h
index 8e68252..0448de2 100644
--- a/WebCore/kwq/qt/qcstring.h
+++ b/WebCore/kwq/qt/qcstring.h
@@ -75,6 +75,9 @@ public:
uint length() const;
bool truncate(uint);
QCString lower() const;
+ QCString upper() const;
+ QCString left(uint) const;
+ QCString right(uint) const;
QCString mid(uint, uint len=0xffffffff) const;
// operators ---------------------------------------------------------------
diff --git a/WebCore/kwq/qt/qstring.h b/WebCore/kwq/qt/qstring.h
index 6373a5e..958682e 100644
--- a/WebCore/kwq/qt/qstring.h
+++ b/WebCore/kwq/qt/qstring.h
@@ -128,7 +128,6 @@ public:
class QString {
public:
- static QString fromLatin1(const char *, int len=-1);
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
@@ -139,6 +138,7 @@ public:
// static member functions -------------------------------------------------
static QString number(long, int base=10);
+ static QString fromLatin1(const char *, int len=-1);
// constructors, copy constructors, and destructors ------------------------
@@ -195,13 +195,13 @@ public:
QString arg (int &);
QString arg(int a, int fieldwidth=0, int base=10) const;
- QString arg(const QString &, int fieldwidth = 0) const;
+ QString arg(const QString &, int fieldwidth=0) const;
QString left(uint) const;
QString right(uint) const;
QString mid(int, int len=0xffffffff) const;
- const char* latin1() const;
+ const char *latin1() const;
const char *ascii() const;
const QChar *unicode() const;
QCString utf8() const;
diff --git a/WebCore/src/kwq/KWQCString.mm b/WebCore/src/kwq/KWQCString.mm
index e38b7a2..a991f07 100644
--- a/WebCore/src/kwq/KWQCString.mm
+++ b/WebCore/src/kwq/KWQCString.mm
@@ -206,6 +206,55 @@ QCString QCString::lower() const
return result;
}
+QCString QCString::upper() const
+{
+ QCString result(data());
+
+ char *p = result.data();
+ if (p) {
+ while(*p) {
+ *p = toupper((uchar)*p);
+ p++;
+ }
+ }
+
+ return result;
+}
+
+QCString QCString::left(uint len) const
+{
+ if (isEmpty()) {
+ QCString empty;
+ return empty;
+ }
+ else if (len >= size()) {
+ QCString same(data());
+ return same;
+ }
+ else {
+ QCString s(len + 1);
+ strncpy(s.data(), data(), len);
+ *(s.data() + len) = '\0';
+ return s;
+ }
+}
+
+QCString QCString::right(uint len) const
+{
+ if (isEmpty()) {
+ QCString empty;
+ return empty;
+ }
+ else {
+ uint l = length();
+ if (len > l) {
+ len = l;
+ }
+ char *p = data() + (l - len);
+ return QCString(p);
+ }
+}
+
QCString QCString::mid(uint index, uint len) const
{
uint slen;
diff --git a/WebCore/src/kwq/KWQString.mm b/WebCore/src/kwq/KWQString.mm
index ac4c091..29224fc 100644
--- a/WebCore/src/kwq/KWQString.mm
+++ b/WebCore/src/kwq/KWQString.mm
@@ -31,6 +31,8 @@
const QString QString::null;
+// constructors, copy constructors, and destructors ------------------------
+
QString::QString()
{
s = NULL;
@@ -96,15 +98,39 @@ QString::~QString()
CFRelease(s);
}
-QString QString::lower() const
+// assignment operators ----------------------------------------------------
+
+QString &QString::operator=(const QString &qs)
{
- QString result(*this);
+ // shared copy
+ CFRetain(qs.s);
+ CFRelease(s);
+ s = qs.s;
+ return *this;
+}
- CFStringLowercase(result.s, NULL);
+QString &QString::operator=(const QCString &qcs)
+{
+ return *this = QString(qcs);
+}
- return result;
+QString &QString::operator=(const char *chs)
+{
+ return *this = QString(chs);
}
+QString &QString::operator=(QChar qc)
+{
+ return *this = QString(qc);
+}
+
+QString &QString::operator=(char ch)
+{
+ return *this = QString(QChar(ch));
+}
+
+// member functions --------------------------------------------------------
+
bool QString::isNull() const
{
return (s == NULL);
@@ -120,42 +146,172 @@ uint QString::length() const
return CFStringGetLength(s);
}
-int QString::find(char, int index=0) const
+bool QString::startsWith(const QString &s) const
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+int QString::toInt() const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+int QString::toInt(bool *b, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+uint QString::toUInt(bool *ok=0, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+long QString::toLong(bool *ok=0, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return 0L;
+}
+
+float QString::toFloat(bool *b=0) const
+{
+ // FIXME: awaiting real implementation
+ return 0.0f;
+}
+
+QString &QString::prepend(const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::append(const char *s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::append(const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+int QString::contains(const char *c, bool cs=TRUE) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+int QString::contains(char c) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::find(const char *, int index=0, bool b=0) const
+int QString::find(char c, int index=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::find(const QString &, int index=0, bool b=0) const
+int QString::find(const char *s, int index=0, bool b=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::find(const QRegExp &, int index=0, bool b=0) const
+int QString::find(const QString &s, int index=0, bool b=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::findRev(char, int index=0) const
+int QString::find(const QRegExp &r, int index=0, bool b=0) const
{
// FIXME: awaiting real implementation
return 0;
}
-int QString::findRev(const char *, int index=0) const
+int QString::findRev(char c, int index=0) const
{
// FIXME: awaiting real implementation
return 0;
}
+int QString::findRev(const char *s, int index=0) const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+QString &QString::remove(uint u1, uint u2)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::replace(const QRegExp &, const QString &)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::insert(uint i, char c)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+void QString::truncate(uint pos)
+{
+ // FIXME: awaiting real implementation
+}
+
+void QString::fill(QChar c, int len=-1)
+{
+ // FIXME: awaiting real implementation
+}
+
+QString QString::arg(int &a)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::arg(int a, int fieldwidth=0, int base=10) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::arg(const QString &s, int fieldwidth=0) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::left(uint pos) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::right(uint pos) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString QString::mid(int pos, int len=0xffffffff) const
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
QString QString::fromLatin1(const char *s, int len=-1)
{
// FIXME: awaiting real implementation
@@ -168,56 +324,79 @@ const char *QString::latin1() const
return (const char *)CFStringGetCStringPtr(s, kCFStringEncodingISOLatin1);
}
+const char *QString::ascii() const
+{
+ // FIXME: awaiting real implementation
+ return NULL;
+}
+
const QChar *QString::unicode() const
{
// FIXME: awaiting real implementation
return (QChar *)CFStringGetCharactersPtr(s);
}
-int QString::contains(const char *s, bool cs=TRUE) const
+QCString QString::utf8() const
{
// FIXME: awaiting real implementation
return 0;
}
-QString QString::mid(int, int len=0xffffffff) const
+QCString QString::local8Bit() const
{
// FIXME: awaiting real implementation
- return NULL;
+ return 0;
}
-QString::operator const char *() const
+QString &QString::setUnicode(const QChar *s, uint i)
{
- return latin1();
+ // FIXME: awaiting real implementation
+ return *this;
}
-QString &QString::operator=(const QString &qs)
+QString &QString::setNum(int i, int base=10)
{
- // shared copy
- CFRetain(qs.s);
- CFRelease(s);
- s = qs.s;
+ // FIXME: awaiting real implementation
return *this;
}
-QString &QString::operator=(const QCString &qcs)
+QString &QString::sprintf(const char *s, ...)
{
- return *this = QString(qcs);
+ // FIXME: awaiting real implementation
+ return *this;
}
-QString &QString::operator=(const char *chs)
+QString QString::lower() const
{
- return *this = QString(chs);
+ // FIXME: awaiting real implementation
+ QString result(*this);
+
+ CFStringLowercase(result.s, NULL);
+
+ return result;
}
-QString &QString::operator=(QChar qc)
+QString QString::stripWhiteSpace() const
{
- return *this = QString(qc);
+ // FIXME: awaiting real implementation
+ return *this;
}
-QString &QString::operator=(char ch)
+QString QString::simplifyWhiteSpace() const
{
- return *this = QString(QChar(ch));
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+void QString::compose()
+{
+ // FIXME: awaiting real implementation
+}
+
+QString QString::visual(int index=0, int len=-1)
+{
+ // FIXME: awaiting real implementation
+ return *this;
}
bool QString::operator!() const
@@ -225,12 +404,35 @@ bool QString::operator!() const
return isNull();
}
+QString::operator const char *() const
+{
+ return latin1();
+}
+
QChar QString::operator[](int i) const
{
// FIXME: awaiting real implementation
return 0;
}
+QString &QString::operator+(char c)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::operator+(QChar c)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
+QString &QString::operator+(const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return *this;
+}
+
QString &QString::operator+=(char c)
{
// FIXME: awaiting real implementation
@@ -249,8 +451,33 @@ QString &QString::operator+=(const QString &s)
return *this;
}
+QString::operator QChar() const
+{
+ // FIXME: awaiting real implementation
+ return 0;
+}
+
+/*
+QString &operator+(const char *s1, const QString &s2)
+{
+ // FIXME: awaiting real implementation
+}
+
+QString &operator+(QChar c, const QString &s)
+{
+ // FIXME: awaiting real implementation
+}
+*/
+
+bool operator==(const QString &s, QChar c)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
bool operator==(const QString &s1, const QString &s2)
{
+ // FIXME: awaiting real implementation
CFComparisonResult cmp;
int flags;
@@ -261,8 +488,27 @@ bool operator==(const QString &s1, const QString &s2)
return (cmp == kCFCompareEqualTo);
}
+bool operator==(const QString &s1, const char *s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+bool operator==(const char *s1, const QString &s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+bool operator!=(const QString &s, QChar c)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
bool operator!=(const QString &s1, const QString &s2)
{
+ // FIXME: awaiting real implementation
CFComparisonResult cmp;
int flags;
@@ -273,6 +519,24 @@ bool operator!=(const QString &s1, const QString &s2)
return (cmp != kCFCompareEqualTo);
}
+bool operator!=(const QString &s1, const char *s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+bool operator!=(const char *s1, const QString &s2)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
+QString operator+(char c, const QString &s)
+{
+ // FIXME: awaiting real implementation
+ return FALSE;
+}
+
QConstString::QConstString(QChar *qcs, uint len)
{
if (qcs || len) {
diff --git a/WebCore/src/kwq/qt/_qstring.h b/WebCore/src/kwq/qt/_qstring.h
index f60f94b..5a83649 100644
--- a/WebCore/src/kwq/qt/_qstring.h
+++ b/WebCore/src/kwq/qt/_qstring.h
@@ -45,10 +45,6 @@
// KWQ hacks ---------------------------------------------------------------
-#ifndef USING_BORROWED_QSTRING
-#define USING_BORROWED_QSTRING
-#endif
-
#include <KWQDef.h>
// -------------------------------------------------------------------------
diff --git a/WebCore/src/kwq/qt/qcstring.h b/WebCore/src/kwq/qt/qcstring.h
index 8e68252..0448de2 100644
--- a/WebCore/src/kwq/qt/qcstring.h
+++ b/WebCore/src/kwq/qt/qcstring.h
@@ -75,6 +75,9 @@ public:
uint length() const;
bool truncate(uint);
QCString lower() const;
+ QCString upper() const;
+ QCString left(uint) const;
+ QCString right(uint) const;
QCString mid(uint, uint len=0xffffffff) const;
// operators ---------------------------------------------------------------
diff --git a/WebCore/src/kwq/qt/qstring.h b/WebCore/src/kwq/qt/qstring.h
index 6373a5e..958682e 100644
--- a/WebCore/src/kwq/qt/qstring.h
+++ b/WebCore/src/kwq/qt/qstring.h
@@ -128,7 +128,6 @@ public:
class QString {
public:
- static QString fromLatin1(const char *, int len=-1);
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
@@ -139,6 +138,7 @@ public:
// static member functions -------------------------------------------------
static QString number(long, int base=10);
+ static QString fromLatin1(const char *, int len=-1);
// constructors, copy constructors, and destructors ------------------------
@@ -195,13 +195,13 @@ public:
QString arg (int &);
QString arg(int a, int fieldwidth=0, int base=10) const;
- QString arg(const QString &, int fieldwidth = 0) const;
+ QString arg(const QString &, int fieldwidth=0) const;
QString left(uint) const;
QString right(uint) const;
QString mid(int, int len=0xffffffff) const;
- const char* latin1() const;
+ const char *latin1() const;
const char *ascii() const;
const QChar *unicode() const;
QCString utf8() const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list