[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:50:40 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 73ae128f71f8b6a64808d99734ec34dddc93ae81
Author: gramps <gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 17 23:21:21 2001 +0000
First attempt at a real implementation
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/KWQKCharsets.h b/WebCore/kwq/KWQKCharsets.h
index 30e03ae..b17466a 100644
--- a/WebCore/kwq/KWQKCharsets.h
+++ b/WebCore/kwq/KWQKCharsets.h
@@ -31,8 +31,8 @@
#endif
#include <qfont.h>
+#include <qstring.h>
-class QString;
class QTextCodec;
// class KCharsets =============================================================
@@ -40,59 +40,26 @@ class QTextCodec;
class KCharsets {
public:
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
// constructors, copy constructors, and destructors ------------------------
KCharsets();
- virtual ~KCharsets();
+ ~KCharsets();
// member functions --------------------------------------------------------
QTextCodec *codecForName(const QString &) const;
QTextCodec *codecForName(const QString &, bool &) const;
- void setQFont(QFont &, QFont::CharSet charset=QFont::Unicode) const;
- void setQFont(QFont &, QString) const;
- QString name(QFont::CharSet);
- QString xCharsetName(QFont::CharSet) const;
- bool supportsScript(const QFont &, QFont::CharSet);
-
- /**
- * @returns the charset that fits a given encoding best (that can display a
- * file in the given encoding)
- */
- QFont::CharSet charsetForEncoding(const QString &encoding) const;
-
- // ### BCI merge with above in 3.0
- /**
- * overloaded member function. Usually you don't mind getting unicode charsets, so
- * this method should rarely be needed.
- */
- QFont::CharSet charsetForEncoding(const QString &e, bool noUnicode) const;
-
- // operators ---------------------------------------------------------------
+ QFont::CharSet charsetForEncoding(const QString &) const;
+ QFont::CharSet charsetForEncoding(const QString &, bool) const;
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
+ void setQFont(QFont &, QFont::CharSet) const;
+ void setQFont(QFont &, QString) const;
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCharsets(const KCharsets &);
-#endif
+ QString name(QFont::CharSet);
+ QString xCharsetName(QFont::CharSet) const;
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCharsets &operator=(const KCharsets &);
-#endif
+ bool supportsScript(const QFont &, QFont::CharSet);
}; // class KCharsets ==========================================================
diff --git a/WebCore/kwq/KWQKCharsets.mm b/WebCore/kwq/KWQKCharsets.mm
index a64b703..bad62c1 100644
--- a/WebCore/kwq/KWQKCharsets.mm
+++ b/WebCore/kwq/KWQKCharsets.mm
@@ -22,80 +22,87 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
-#include <qstring.h>
-#include <qtextcodec.h>
+// FIXME: obviously many functions here can be made inline
+
#include <kcharsets.h>
+#include <qtextcodec.h>
+#include <kwqdebug.h>
+
+// constructors, copy constructors, and destructors ----------------------------
KCharsets::KCharsets()
{
- _logNotYetImplemented();
+ // do nothing
}
-
KCharsets::~KCharsets()
{
- _logNotYetImplemented();
+ // do nothing
}
+// member functions --------------------------------------------------------
-QTextCodec *KCharsets::codecForName(const QString &s) const
+QTextCodec *KCharsets::codecForName(const QString &qs) const
{
- //_logNotYetImplemented();
- // FIXME: implement correctly
- QTextCodec::codecForName(s.latin1());
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QTextCodec::codecForName(qs.latin1());
}
-
-QTextCodec *KCharsets::codecForName(const QString &s, bool &b) const
+QTextCodec *KCharsets::codecForName(const QString &qs, bool &ok) const
{
- //_logNotYetImplemented();
- // FIXME: implement correctly
- QTextCodec::codecForName(s.latin1());
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ ok = false;
+ return QTextCodec::codecForName(qs.latin1());
}
-
-void KCharsets::setQFont(QFont &, QFont::CharSet charset=QFont::Unicode) const
+QFont::CharSet KCharsets::charsetForEncoding(const QString &) const
{
- _logNotYetImplemented();
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QFont::Latin1;
}
-
-void KCharsets::setQFont(QFont &, QString) const
+QFont::CharSet KCharsets::charsetForEncoding(const QString &, bool) const
{
- _logNotYetImplemented();
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QFont::Latin1;
}
-
-QString KCharsets::name(QFont::CharSet)
+void KCharsets::setQFont(QFont &, QFont::CharSet) const
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ // do nothing
}
-
-QString KCharsets::xCharsetName(QFont::CharSet) const
+void KCharsets::setQFont(QFont &, QString) const
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ // do nothing
}
-
-bool KCharsets::supportsScript(const QFont &, QFont::CharSet)
+QString KCharsets::name(QFont::CharSet)
{
- _logNotYetImplemented();
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QString();
}
-
-QFont::CharSet KCharsets::charsetForEncoding(const QString &encoding) const
+QString KCharsets::xCharsetName(QFont::CharSet) const
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ return QString();
}
-
-QFont::CharSet KCharsets::charsetForEncoding(const QString &e, bool noUnicode) const
+bool KCharsets::supportsScript(const QFont &, QFont::CharSet)
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ return true;
}
-
-
-
diff --git a/WebCore/kwq/kdecore/kcharsets.h b/WebCore/kwq/kdecore/kcharsets.h
index 30e03ae..b17466a 100644
--- a/WebCore/kwq/kdecore/kcharsets.h
+++ b/WebCore/kwq/kdecore/kcharsets.h
@@ -31,8 +31,8 @@
#endif
#include <qfont.h>
+#include <qstring.h>
-class QString;
class QTextCodec;
// class KCharsets =============================================================
@@ -40,59 +40,26 @@ class QTextCodec;
class KCharsets {
public:
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
// constructors, copy constructors, and destructors ------------------------
KCharsets();
- virtual ~KCharsets();
+ ~KCharsets();
// member functions --------------------------------------------------------
QTextCodec *codecForName(const QString &) const;
QTextCodec *codecForName(const QString &, bool &) const;
- void setQFont(QFont &, QFont::CharSet charset=QFont::Unicode) const;
- void setQFont(QFont &, QString) const;
- QString name(QFont::CharSet);
- QString xCharsetName(QFont::CharSet) const;
- bool supportsScript(const QFont &, QFont::CharSet);
-
- /**
- * @returns the charset that fits a given encoding best (that can display a
- * file in the given encoding)
- */
- QFont::CharSet charsetForEncoding(const QString &encoding) const;
-
- // ### BCI merge with above in 3.0
- /**
- * overloaded member function. Usually you don't mind getting unicode charsets, so
- * this method should rarely be needed.
- */
- QFont::CharSet charsetForEncoding(const QString &e, bool noUnicode) const;
-
- // operators ---------------------------------------------------------------
+ QFont::CharSet charsetForEncoding(const QString &) const;
+ QFont::CharSet charsetForEncoding(const QString &, bool) const;
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
+ void setQFont(QFont &, QFont::CharSet) const;
+ void setQFont(QFont &, QString) const;
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCharsets(const KCharsets &);
-#endif
+ QString name(QFont::CharSet);
+ QString xCharsetName(QFont::CharSet) const;
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCharsets &operator=(const KCharsets &);
-#endif
+ bool supportsScript(const QFont &, QFont::CharSet);
}; // class KCharsets ==========================================================
diff --git a/WebCore/src/kwq/KWQKCharsets.mm b/WebCore/src/kwq/KWQKCharsets.mm
index a64b703..bad62c1 100644
--- a/WebCore/src/kwq/KWQKCharsets.mm
+++ b/WebCore/src/kwq/KWQKCharsets.mm
@@ -22,80 +22,87 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
-#include <qstring.h>
-#include <qtextcodec.h>
+// FIXME: obviously many functions here can be made inline
+
#include <kcharsets.h>
+#include <qtextcodec.h>
+#include <kwqdebug.h>
+
+// constructors, copy constructors, and destructors ----------------------------
KCharsets::KCharsets()
{
- _logNotYetImplemented();
+ // do nothing
}
-
KCharsets::~KCharsets()
{
- _logNotYetImplemented();
+ // do nothing
}
+// member functions --------------------------------------------------------
-QTextCodec *KCharsets::codecForName(const QString &s) const
+QTextCodec *KCharsets::codecForName(const QString &qs) const
{
- //_logNotYetImplemented();
- // FIXME: implement correctly
- QTextCodec::codecForName(s.latin1());
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QTextCodec::codecForName(qs.latin1());
}
-
-QTextCodec *KCharsets::codecForName(const QString &s, bool &b) const
+QTextCodec *KCharsets::codecForName(const QString &qs, bool &ok) const
{
- //_logNotYetImplemented();
- // FIXME: implement correctly
- QTextCodec::codecForName(s.latin1());
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ ok = false;
+ return QTextCodec::codecForName(qs.latin1());
}
-
-void KCharsets::setQFont(QFont &, QFont::CharSet charset=QFont::Unicode) const
+QFont::CharSet KCharsets::charsetForEncoding(const QString &) const
{
- _logNotYetImplemented();
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QFont::Latin1;
}
-
-void KCharsets::setQFont(QFont &, QString) const
+QFont::CharSet KCharsets::charsetForEncoding(const QString &, bool) const
{
- _logNotYetImplemented();
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QFont::Latin1;
}
-
-QString KCharsets::name(QFont::CharSet)
+void KCharsets::setQFont(QFont &, QFont::CharSet) const
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ // do nothing
}
-
-QString KCharsets::xCharsetName(QFont::CharSet) const
+void KCharsets::setQFont(QFont &, QString) const
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ // do nothing
}
-
-bool KCharsets::supportsScript(const QFont &, QFont::CharSet)
+QString KCharsets::name(QFont::CharSet)
{
- _logNotYetImplemented();
+ // FIXME: need real implementation here
+ _logPartiallyImplemented();
+ return QString();
}
-
-QFont::CharSet KCharsets::charsetForEncoding(const QString &encoding) const
+QString KCharsets::xCharsetName(QFont::CharSet) const
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ return QString();
}
-
-QFont::CharSet KCharsets::charsetForEncoding(const QString &e, bool noUnicode) const
+bool KCharsets::supportsScript(const QFont &, QFont::CharSet)
{
- _logNotYetImplemented();
+ // FIXME: do we need a real implementation here?
+ _logPartiallyImplemented();
+ return true;
}
-
-
-
diff --git a/WebCore/src/kwq/kdecore/kcharsets.h b/WebCore/src/kwq/kdecore/kcharsets.h
index 30e03ae..b17466a 100644
--- a/WebCore/src/kwq/kdecore/kcharsets.h
+++ b/WebCore/src/kwq/kdecore/kcharsets.h
@@ -31,8 +31,8 @@
#endif
#include <qfont.h>
+#include <qstring.h>
-class QString;
class QTextCodec;
// class KCharsets =============================================================
@@ -40,59 +40,26 @@ class QTextCodec;
class KCharsets {
public:
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
// constructors, copy constructors, and destructors ------------------------
KCharsets();
- virtual ~KCharsets();
+ ~KCharsets();
// member functions --------------------------------------------------------
QTextCodec *codecForName(const QString &) const;
QTextCodec *codecForName(const QString &, bool &) const;
- void setQFont(QFont &, QFont::CharSet charset=QFont::Unicode) const;
- void setQFont(QFont &, QString) const;
- QString name(QFont::CharSet);
- QString xCharsetName(QFont::CharSet) const;
- bool supportsScript(const QFont &, QFont::CharSet);
-
- /**
- * @returns the charset that fits a given encoding best (that can display a
- * file in the given encoding)
- */
- QFont::CharSet charsetForEncoding(const QString &encoding) const;
-
- // ### BCI merge with above in 3.0
- /**
- * overloaded member function. Usually you don't mind getting unicode charsets, so
- * this method should rarely be needed.
- */
- QFont::CharSet charsetForEncoding(const QString &e, bool noUnicode) const;
-
- // operators ---------------------------------------------------------------
+ QFont::CharSet charsetForEncoding(const QString &) const;
+ QFont::CharSet charsetForEncoding(const QString &, bool) const;
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
+ void setQFont(QFont &, QFont::CharSet) const;
+ void setQFont(QFont &, QString) const;
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KCharsets(const KCharsets &);
-#endif
+ QString name(QFont::CharSet);
+ QString xCharsetName(QFont::CharSet) const;
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KCharsets &operator=(const KCharsets &);
-#endif
+ bool supportsScript(const QFont &, QFont::CharSet);
}; // class KCharsets ==========================================================
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list