[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

gramps gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:45:55 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f19364b3140faf9e699fa0838813704e5b6d043b
Author: gramps <gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 21 01:36:16 2001 +0000

    Moved QChar implementation into new KWQChar.mm
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index a6372d1..d73a1d6 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -25,205 +25,7 @@
 
 // FIXME: obviously many functions here can be made inline
 
-// FIXME: should QChar and QConstString be in separate source files?
-
 #include <qstring.h>
-#include <ctype.h>
-
-static UniChar scratchUniChar;
-
-static CFMutableStringRef GetScratchUniCharString()
-{
-    static CFMutableStringRef s = NULL;
-
-    if (!s) {
-        // FIXME: this CFMutableString will be leaked exactly once
-        s = CFStringCreateMutableWithExternalCharactersNoCopy(NULL,
-                &scratchUniChar, 1, 1, kCFAllocatorNull);
-    }
-    return s;
-}
-
-QChar::QChar()
-{
-    c = 0;
-}
-
-QChar::QChar(char ch)
-{
-    c = ch;
-}
-
-QChar::QChar(uchar uch)
-{
-    c = uch;
-}
-
-QChar::QChar(short n)
-{
-    c = n;
-}
-
-QChar::QChar(ushort n)
-{
-    c = n;
-}
-
-QChar::QChar(uint n)
-{
-    c = n;
-}
-
-QChar::QChar(int n)
-{
-    c = n;
-}
-
-QChar::QChar(const QChar &qc)
-{
-    c = qc.c;
-}
-
-QChar::~QChar()
-{
-    // do nothing
-}
-
-QChar QChar::lower() const
-{
-    scratchUniChar = c;
-    CFStringLowercase(GetScratchUniCharString(), NULL);
-    if (scratchUniChar) {
-	return QChar(scratchUniChar);
-    }
-    return *this;
-}
-
-QChar QChar::upper() const
-{
-    scratchUniChar = c;
-    CFStringUppercase(GetScratchUniCharString(), NULL);
-    if (scratchUniChar) {
-	return QChar(scratchUniChar);
-    }
-    return *this;
-}
-
-char QChar::latin1() const
-{
-    return row() ? 0 : cell();
-}
-
-bool QChar::isNull() const
-{
-    return c == 0;
-}
-
-bool QChar::isDigit() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetDecimalDigit), c);
-}
-
-bool QChar::isSpace() const
-{
-    if (!row()) {
-	return isspace(c);
-    }
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetWhitespaceAndNewline), c);
-}
-
-bool QChar::isLetter() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetLetter), c);
-}
-
-bool QChar::isLetterOrNumber() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetAlphaNumeric), c) || isDigit();
-}
-
-bool QChar::isPunct() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetPunctuation), c);
-}
-
-uchar QChar::cell() const
-{
-    // return least significant byte
-    return c & 0xff;
-}
-
-uchar QChar::row() const
-{
-    // return most significant byte
-    return (c & 0xff00) >> 8;
-}
-
-QChar::Direction QChar::direction() const
-{
-    // FIXME: unimplemented because we don't do BIDI yet
-    return DirL;
-}
-
-bool QChar::mirrored() const
-{
-    // FIXME: unimplemented because we don't do BIDI yet
-    // return whether character should be reversed if text direction is
-    // reversed
-    return FALSE;
-}
-
-QChar QChar::mirroredChar() const
-{
-    // FIXME: unimplemented because we don't do BIDI yet
-    // return mirrored character if it is mirrored else return itself
-    return *this;
-}
-
-ushort QChar::unicode() const
-{
-    return c;
-}
-
-int operator==(QChar qc1, QChar qc2)
-{
-    return qc1.c == qc2.c;
-}
-
-int operator==(QChar qc, char ch)
-{
-    return qc.c == ch;
-}
-
-int operator==(char ch, QChar qc)
-{
-    return ch == qc.c;
-}
-
-int operator!=(QChar qc1, QChar qc2)
-{
-    return qc1.c != qc2.c;
-}
-
-int operator!=(QChar qc, char ch)
-{
-    return qc.c != ch;
-}
-
-int operator!=(char ch, QChar qc)
-{
-    return ch != qc.c;
-}
-
-QChar::operator char() const
-{
-    return latin1();
-}
 
 QString::QString()
 {
diff --git a/WebCore/src/kwq/KWQString.mm b/WebCore/src/kwq/KWQString.mm
index a6372d1..d73a1d6 100644
--- a/WebCore/src/kwq/KWQString.mm
+++ b/WebCore/src/kwq/KWQString.mm
@@ -25,205 +25,7 @@
 
 // FIXME: obviously many functions here can be made inline
 
-// FIXME: should QChar and QConstString be in separate source files?
-
 #include <qstring.h>
-#include <ctype.h>
-
-static UniChar scratchUniChar;
-
-static CFMutableStringRef GetScratchUniCharString()
-{
-    static CFMutableStringRef s = NULL;
-
-    if (!s) {
-        // FIXME: this CFMutableString will be leaked exactly once
-        s = CFStringCreateMutableWithExternalCharactersNoCopy(NULL,
-                &scratchUniChar, 1, 1, kCFAllocatorNull);
-    }
-    return s;
-}
-
-QChar::QChar()
-{
-    c = 0;
-}
-
-QChar::QChar(char ch)
-{
-    c = ch;
-}
-
-QChar::QChar(uchar uch)
-{
-    c = uch;
-}
-
-QChar::QChar(short n)
-{
-    c = n;
-}
-
-QChar::QChar(ushort n)
-{
-    c = n;
-}
-
-QChar::QChar(uint n)
-{
-    c = n;
-}
-
-QChar::QChar(int n)
-{
-    c = n;
-}
-
-QChar::QChar(const QChar &qc)
-{
-    c = qc.c;
-}
-
-QChar::~QChar()
-{
-    // do nothing
-}
-
-QChar QChar::lower() const
-{
-    scratchUniChar = c;
-    CFStringLowercase(GetScratchUniCharString(), NULL);
-    if (scratchUniChar) {
-	return QChar(scratchUniChar);
-    }
-    return *this;
-}
-
-QChar QChar::upper() const
-{
-    scratchUniChar = c;
-    CFStringUppercase(GetScratchUniCharString(), NULL);
-    if (scratchUniChar) {
-	return QChar(scratchUniChar);
-    }
-    return *this;
-}
-
-char QChar::latin1() const
-{
-    return row() ? 0 : cell();
-}
-
-bool QChar::isNull() const
-{
-    return c == 0;
-}
-
-bool QChar::isDigit() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetDecimalDigit), c);
-}
-
-bool QChar::isSpace() const
-{
-    if (!row()) {
-	return isspace(c);
-    }
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetWhitespaceAndNewline), c);
-}
-
-bool QChar::isLetter() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetLetter), c);
-}
-
-bool QChar::isLetterOrNumber() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetAlphaNumeric), c) || isDigit();
-}
-
-bool QChar::isPunct() const
-{
-    return CFCharacterSetIsCharacterMember(CFCharacterSetGetPredefined(
-                kCFCharacterSetPunctuation), c);
-}
-
-uchar QChar::cell() const
-{
-    // return least significant byte
-    return c & 0xff;
-}
-
-uchar QChar::row() const
-{
-    // return most significant byte
-    return (c & 0xff00) >> 8;
-}
-
-QChar::Direction QChar::direction() const
-{
-    // FIXME: unimplemented because we don't do BIDI yet
-    return DirL;
-}
-
-bool QChar::mirrored() const
-{
-    // FIXME: unimplemented because we don't do BIDI yet
-    // return whether character should be reversed if text direction is
-    // reversed
-    return FALSE;
-}
-
-QChar QChar::mirroredChar() const
-{
-    // FIXME: unimplemented because we don't do BIDI yet
-    // return mirrored character if it is mirrored else return itself
-    return *this;
-}
-
-ushort QChar::unicode() const
-{
-    return c;
-}
-
-int operator==(QChar qc1, QChar qc2)
-{
-    return qc1.c == qc2.c;
-}
-
-int operator==(QChar qc, char ch)
-{
-    return qc.c == ch;
-}
-
-int operator==(char ch, QChar qc)
-{
-    return ch == qc.c;
-}
-
-int operator!=(QChar qc1, QChar qc2)
-{
-    return qc1.c != qc2.c;
-}
-
-int operator!=(QChar qc, char ch)
-{
-    return qc.c != ch;
-}
-
-int operator!=(char ch, QChar qc)
-{
-    return ch != qc.c;
-}
-
-QChar::operator char() const
-{
-    return latin1();
-}
 
 QString::QString()
 {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list