[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:37:17 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 7e7b97baa1249729842c7d26bea2ac1573404287
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 9 06:11:13 2002 +0000
Tools:
* Scripts/update-kwq-assert: Added. Script to keep the KWQ version
of the assert macros in sync. with the WebFoundation version. Just
update the WebFoundation one and run this script.
* wftool/WFTool.m: Remove obsolete include.
WebCore:
Switch over to new assertion/logging scheme.
* kwq/KWQAssertions.h: Added.
* kwq/KWQAssertions.m: Added.
* kwq/KWQLogging.h: Added.
* kwq/KWQLogging.m: Added.
* kwq/kwqdebug.h: Removed.
* kwq/kwqdebug.mm: Removed.
* WebCore.pbproj/project.pbxproj: Update to reflect above changes.
* kwq/KWQApplication.mm:
* kwq/KWQChar.mm:
* kwq/KWQColor.mm:
* kwq/KWQComboBox.mm:
* kwq/KWQCompletion.mm:
* kwq/KWQCursor.mm:
* kwq/KWQDrawUtil.mm:
* kwq/KWQEvent.mm:
* kwq/KWQFontInfo.mm:
* kwq/KWQFontMetrics.mm:
* kwq/KWQFrame.mm:
* kwq/KWQHBox.mm:
* kwq/KWQInputDialog.mm:
* kwq/KWQInvisibleButton.mm:
* kwq/KWQKConfigBase.mm:
* kwq/KWQKFileDialog.mm:
* kwq/KWQKFileItem.mm:
* kwq/KWQKGlobalSettings.mm:
* kwq/KWQKHTMLPartImpl.mm:
* kwq/KWQKHTMLSettings.mm:
* kwq/KWQKIconLoader.mm:
* kwq/KWQKJob.mm:
* kwq/KWQKLocale.mm:
* kwq/KWQKMimeType.mm:
* kwq/KWQKPartsEvent.mm:
* kwq/KWQKSimpleConfig.mm:
* kwq/KWQKURL.mm:
* kwq/KWQKWin.mm:
* kwq/KWQKWinModule.mm:
* kwq/KWQKjobclasses.mm:
* kwq/KWQKnetaccess.mm:
* kwq/KWQLabel.mm:
* kwq/KWQLineEdit.mm:
* kwq/KWQListBox.mm:
* kwq/KWQListImpl.mm:
* kwq/KWQLoaderImpl.mm:
* kwq/KWQObject.mm:
* kwq/KWQPaintDeviceMetrics.mm:
* kwq/KWQPainter.mm:
* kwq/KWQPixmap.mm:
* kwq/KWQRegion.mm:
* kwq/KWQScrollView.mm:
* kwq/KWQSlot.mm:
* kwq/KWQString.mm:
* kwq/KWQTimer.mm:
* kwq/KWQWidget.mm:
* kwq/KWQbrowserinterface.mm:
* kwq/KWQtextcodec.mm:
* kwq/KWQtextstream.mm:
* kwq/KWQxml.mm:
* kwq/WebCoreBridge.mm:
* kwq/WebCoreCookieAdapter.m:
* kwq/WebCoreHistory.m:
* kwq/WebCoreImageRendererFactory.m:
* kwq/WebCoreTextRendererFactory.m:
* kwq/WebCoreViewFactory.m:
Update to use new assertions and logging macros.
In some cases, just removed unneeded includes.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 1ee73a2..dff810d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,74 @@
+2002-09-08 Darin Adler <darin at apple.com>
+
+ Switch over to new assertion/logging scheme.
+
+ * kwq/KWQAssertions.h: Added.
+ * kwq/KWQAssertions.m: Added.
+ * kwq/KWQLogging.h: Added.
+ * kwq/KWQLogging.m: Added.
+ * kwq/kwqdebug.h: Removed.
+ * kwq/kwqdebug.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Update to reflect above changes.
+
+ * kwq/KWQApplication.mm:
+ * kwq/KWQChar.mm:
+ * kwq/KWQColor.mm:
+ * kwq/KWQComboBox.mm:
+ * kwq/KWQCompletion.mm:
+ * kwq/KWQCursor.mm:
+ * kwq/KWQDrawUtil.mm:
+ * kwq/KWQEvent.mm:
+ * kwq/KWQFontInfo.mm:
+ * kwq/KWQFontMetrics.mm:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQHBox.mm:
+ * kwq/KWQInputDialog.mm:
+ * kwq/KWQInvisibleButton.mm:
+ * kwq/KWQKConfigBase.mm:
+ * kwq/KWQKFileDialog.mm:
+ * kwq/KWQKFileItem.mm:
+ * kwq/KWQKGlobalSettings.mm:
+ * kwq/KWQKHTMLPartImpl.mm:
+ * kwq/KWQKHTMLSettings.mm:
+ * kwq/KWQKIconLoader.mm:
+ * kwq/KWQKJob.mm:
+ * kwq/KWQKLocale.mm:
+ * kwq/KWQKMimeType.mm:
+ * kwq/KWQKPartsEvent.mm:
+ * kwq/KWQKSimpleConfig.mm:
+ * kwq/KWQKURL.mm:
+ * kwq/KWQKWin.mm:
+ * kwq/KWQKWinModule.mm:
+ * kwq/KWQKjobclasses.mm:
+ * kwq/KWQKnetaccess.mm:
+ * kwq/KWQLabel.mm:
+ * kwq/KWQLineEdit.mm:
+ * kwq/KWQListBox.mm:
+ * kwq/KWQListImpl.mm:
+ * kwq/KWQLoaderImpl.mm:
+ * kwq/KWQObject.mm:
+ * kwq/KWQPaintDeviceMetrics.mm:
+ * kwq/KWQPainter.mm:
+ * kwq/KWQPixmap.mm:
+ * kwq/KWQRegion.mm:
+ * kwq/KWQScrollView.mm:
+ * kwq/KWQSlot.mm:
+ * kwq/KWQString.mm:
+ * kwq/KWQTimer.mm:
+ * kwq/KWQWidget.mm:
+ * kwq/KWQbrowserinterface.mm:
+ * kwq/KWQtextcodec.mm:
+ * kwq/KWQtextstream.mm:
+ * kwq/KWQxml.mm:
+ * kwq/WebCoreBridge.mm:
+ * kwq/WebCoreCookieAdapter.m:
+ * kwq/WebCoreHistory.m:
+ * kwq/WebCoreImageRendererFactory.m:
+ * kwq/WebCoreTextRendererFactory.m:
+ * kwq/WebCoreViewFactory.m:
+ Update to use new assertions and logging macros.
+ In some cases, just removed unneeded includes.
+
2002-09-08 David Hyatt <hyatt at apple.com>
Landing the new layer system and turning it on for painting of
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1ee73a2..dff810d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,74 @@
+2002-09-08 Darin Adler <darin at apple.com>
+
+ Switch over to new assertion/logging scheme.
+
+ * kwq/KWQAssertions.h: Added.
+ * kwq/KWQAssertions.m: Added.
+ * kwq/KWQLogging.h: Added.
+ * kwq/KWQLogging.m: Added.
+ * kwq/kwqdebug.h: Removed.
+ * kwq/kwqdebug.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Update to reflect above changes.
+
+ * kwq/KWQApplication.mm:
+ * kwq/KWQChar.mm:
+ * kwq/KWQColor.mm:
+ * kwq/KWQComboBox.mm:
+ * kwq/KWQCompletion.mm:
+ * kwq/KWQCursor.mm:
+ * kwq/KWQDrawUtil.mm:
+ * kwq/KWQEvent.mm:
+ * kwq/KWQFontInfo.mm:
+ * kwq/KWQFontMetrics.mm:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQHBox.mm:
+ * kwq/KWQInputDialog.mm:
+ * kwq/KWQInvisibleButton.mm:
+ * kwq/KWQKConfigBase.mm:
+ * kwq/KWQKFileDialog.mm:
+ * kwq/KWQKFileItem.mm:
+ * kwq/KWQKGlobalSettings.mm:
+ * kwq/KWQKHTMLPartImpl.mm:
+ * kwq/KWQKHTMLSettings.mm:
+ * kwq/KWQKIconLoader.mm:
+ * kwq/KWQKJob.mm:
+ * kwq/KWQKLocale.mm:
+ * kwq/KWQKMimeType.mm:
+ * kwq/KWQKPartsEvent.mm:
+ * kwq/KWQKSimpleConfig.mm:
+ * kwq/KWQKURL.mm:
+ * kwq/KWQKWin.mm:
+ * kwq/KWQKWinModule.mm:
+ * kwq/KWQKjobclasses.mm:
+ * kwq/KWQKnetaccess.mm:
+ * kwq/KWQLabel.mm:
+ * kwq/KWQLineEdit.mm:
+ * kwq/KWQListBox.mm:
+ * kwq/KWQListImpl.mm:
+ * kwq/KWQLoaderImpl.mm:
+ * kwq/KWQObject.mm:
+ * kwq/KWQPaintDeviceMetrics.mm:
+ * kwq/KWQPainter.mm:
+ * kwq/KWQPixmap.mm:
+ * kwq/KWQRegion.mm:
+ * kwq/KWQScrollView.mm:
+ * kwq/KWQSlot.mm:
+ * kwq/KWQString.mm:
+ * kwq/KWQTimer.mm:
+ * kwq/KWQWidget.mm:
+ * kwq/KWQbrowserinterface.mm:
+ * kwq/KWQtextcodec.mm:
+ * kwq/KWQtextstream.mm:
+ * kwq/KWQxml.mm:
+ * kwq/WebCoreBridge.mm:
+ * kwq/WebCoreCookieAdapter.m:
+ * kwq/WebCoreHistory.m:
+ * kwq/WebCoreImageRendererFactory.m:
+ * kwq/WebCoreTextRendererFactory.m:
+ * kwq/WebCoreViewFactory.m:
+ Update to use new assertions and logging macros.
+ In some cases, just removed unneeded includes.
+
2002-09-08 David Hyatt <hyatt at apple.com>
Landing the new layer system and turning it on for painting of
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1ee73a2..dff810d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,74 @@
+2002-09-08 Darin Adler <darin at apple.com>
+
+ Switch over to new assertion/logging scheme.
+
+ * kwq/KWQAssertions.h: Added.
+ * kwq/KWQAssertions.m: Added.
+ * kwq/KWQLogging.h: Added.
+ * kwq/KWQLogging.m: Added.
+ * kwq/kwqdebug.h: Removed.
+ * kwq/kwqdebug.mm: Removed.
+ * WebCore.pbproj/project.pbxproj: Update to reflect above changes.
+
+ * kwq/KWQApplication.mm:
+ * kwq/KWQChar.mm:
+ * kwq/KWQColor.mm:
+ * kwq/KWQComboBox.mm:
+ * kwq/KWQCompletion.mm:
+ * kwq/KWQCursor.mm:
+ * kwq/KWQDrawUtil.mm:
+ * kwq/KWQEvent.mm:
+ * kwq/KWQFontInfo.mm:
+ * kwq/KWQFontMetrics.mm:
+ * kwq/KWQFrame.mm:
+ * kwq/KWQHBox.mm:
+ * kwq/KWQInputDialog.mm:
+ * kwq/KWQInvisibleButton.mm:
+ * kwq/KWQKConfigBase.mm:
+ * kwq/KWQKFileDialog.mm:
+ * kwq/KWQKFileItem.mm:
+ * kwq/KWQKGlobalSettings.mm:
+ * kwq/KWQKHTMLPartImpl.mm:
+ * kwq/KWQKHTMLSettings.mm:
+ * kwq/KWQKIconLoader.mm:
+ * kwq/KWQKJob.mm:
+ * kwq/KWQKLocale.mm:
+ * kwq/KWQKMimeType.mm:
+ * kwq/KWQKPartsEvent.mm:
+ * kwq/KWQKSimpleConfig.mm:
+ * kwq/KWQKURL.mm:
+ * kwq/KWQKWin.mm:
+ * kwq/KWQKWinModule.mm:
+ * kwq/KWQKjobclasses.mm:
+ * kwq/KWQKnetaccess.mm:
+ * kwq/KWQLabel.mm:
+ * kwq/KWQLineEdit.mm:
+ * kwq/KWQListBox.mm:
+ * kwq/KWQListImpl.mm:
+ * kwq/KWQLoaderImpl.mm:
+ * kwq/KWQObject.mm:
+ * kwq/KWQPaintDeviceMetrics.mm:
+ * kwq/KWQPainter.mm:
+ * kwq/KWQPixmap.mm:
+ * kwq/KWQRegion.mm:
+ * kwq/KWQScrollView.mm:
+ * kwq/KWQSlot.mm:
+ * kwq/KWQString.mm:
+ * kwq/KWQTimer.mm:
+ * kwq/KWQWidget.mm:
+ * kwq/KWQbrowserinterface.mm:
+ * kwq/KWQtextcodec.mm:
+ * kwq/KWQtextstream.mm:
+ * kwq/KWQxml.mm:
+ * kwq/WebCoreBridge.mm:
+ * kwq/WebCoreCookieAdapter.m:
+ * kwq/WebCoreHistory.m:
+ * kwq/WebCoreImageRendererFactory.m:
+ * kwq/WebCoreTextRendererFactory.m:
+ * kwq/WebCoreViewFactory.m:
+ Update to use new assertions and logging macros.
+ In some cases, just removed unneeded includes.
+
2002-09-08 David Hyatt <hyatt at apple.com>
Landing the new layer system and turning it on for painting of
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 1205f3e..3d9b1d0 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -191,7 +191,6 @@
F587855702DE375901EA4122,
F587855E02DE375901EA4122,
F587856502DE375901EA4122,
- F587856A02DE375901EA4122,
F587856C02DE375901EA4122,
F587856D02DE375901EA4122,
F587857502DE375901EA4122,
@@ -494,6 +493,8 @@
F583D50303140623018635CE,
F5517DC4031AB56301A80180,
F690CFEC031C47F401CA2AC4,
+ 9377FB57032C235C008635CE,
+ 93861DE1032C2E52008635CE,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -527,7 +528,6 @@
F587856702DE375901EA4122,
F587856802DE375901EA4122,
F587856902DE375901EA4122,
- F587856B02DE375901EA4122,
F587856E02DE375901EA4122,
F587856F02DE375901EA4122,
F587857002DE375901EA4122,
@@ -724,6 +724,8 @@
F583D50403140623018635CE,
F5517DC5031AB56301A80180,
F690CFED031C47F401CA2AC4,
+ 9377FB58032C235C008635CE,
+ 93861DE2032C2E52008635CE,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -834,6 +836,64 @@
//352
//353
//354
+//930
+//931
+//932
+//933
+//934
+ 9377FB55032C235C008635CE = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = KWQAssertions.h;
+ refType = 4;
+ };
+ 9377FB56032C235C008635CE = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = KWQAssertions.m;
+ refType = 4;
+ };
+ 9377FB57032C235C008635CE = {
+ fileRef = 9377FB55032C235C008635CE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9377FB58032C235C008635CE = {
+ fileRef = 9377FB56032C235C008635CE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 93861DDF032C2E52008635CE = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = KWQLogging.h;
+ refType = 4;
+ };
+ 93861DE0032C2E52008635CE = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = KWQLogging.m;
+ refType = 4;
+ };
+ 93861DE1032C2E52008635CE = {
+ fileRef = 93861DDF032C2E52008635CE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 93861DE2032C2E52008635CE = {
+ fileRef = 93861DE0032C2E52008635CE;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+//930
+//931
+//932
+//933
+//934
//F50
//F51
//F52
@@ -915,13 +975,13 @@
};
F523D15002DE4271018635CA = {
children = (
- F58784D802DE375901EA4122,
- F58784D902DE375901EA4122,
+ 9377FB55032C235C008635CE,
+ 9377FB56032C235C008635CE,
+ F58784CC02DE375901EA4122,
F5BFAAC10309CDF6018635CE,
F550D70B02E13281018635CA,
F550D70902E13281018635CA,
F550D70C02E13281018635CA,
- F58784CC02DE375901EA4122,
F58784CD02DE375901EA4122,
F58784D302DE375901EA4122,
F58784D402DE375901EA4122,
@@ -938,6 +998,8 @@
F58784FC02DE375901EA4122,
F587851702DE375901EA4122,
F587850302DE375901EA4122,
+ 93861DDF032C2E52008635CE,
+ 93861DE0032C2E52008635CE,
F587851B02DE375901EA4122,
F587851C02DE375901EA4122,
F587852A02DE375901EA4122,
@@ -4182,18 +4244,6 @@
path = ../KWQDateTime.mm;
refType = 4;
};
- F58784D802DE375901EA4122 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = kwqdebug.h;
- refType = 4;
- };
- F58784D902DE375901EA4122 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = kwqdebug.mm;
- refType = 4;
- };
F58784DA02DE375901EA4122 = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -5038,18 +5088,6 @@
settings = {
};
};
- F587856A02DE375901EA4122 = {
- fileRef = F58784D802DE375901EA4122;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F587856B02DE375901EA4122 = {
- fileRef = F58784D902DE375901EA4122;
- isa = PBXBuildFile;
- settings = {
- };
- };
F587856C02DE375901EA4122 = {
fileRef = F58784DA02DE375901EA4122;
isa = PBXBuildFile;
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index 83ba9e7..15c2486 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -24,7 +24,7 @@
*/
#import <qapplication.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QPalette QApplication::palette(const QWidget *p)
{
@@ -62,12 +62,12 @@ QSize QApplication::globalStrut()
void QApplication::setOverrideCursor(const QCursor &c)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
void QApplication::restoreOverrideCursor()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QStyle &QApplication::style()
diff --git a/WebCore/kwq/KWQAssertions.h b/WebCore/kwq/KWQAssertions.h
new file mode 100644
index 0000000..125ea5b
--- /dev/null
+++ b/WebCore/kwq/KWQAssertions.h
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Note, this file uses many GCC extensions, but it should be compatible with
+// C, Objective C, C++, and Objective C++.
+
+// For non-debug builds, everything is disabled by default.
+// Defining any of the symbols explicitly prevents this from having any effect.
+
+#ifdef NDEBUG
+
+#ifndef ASSERT_DISABLED
+#define ASSERT_DISABLED 1
+#endif
+
+#ifndef ASSERT_ARG_DISABLED
+#define ASSERT_ARG_DISABLED 1
+#endif
+
+#ifndef FATAL_DISABLED
+#define FATAL_DISABLED 1
+#endif
+
+#ifndef ERROR_DISABLED
+#define ERROR_DISABLED 1
+#endif
+
+#ifndef LOG_DISABLED
+#define LOG_DISABLED 1
+#endif
+
+#endif
+
+// These helper functions are always declared, but not necessarily always defined if the corresponding function is disabled.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ unsigned mask;
+ const char *defaultName;
+ enum { KWQLogChannelUninitialized, KWQLogChannelOff, KWQLogChannelOn } state;
+} KWQLogChannel;
+
+void KWQReportAssertionFailure(const char *file, int line, const char *function, const char *assertion);
+void KWQReportAssertionFailureWithMessage(const char *file, int line, const char *function, const char *assertion, const char *format, ...);
+void KWQReportArgumentAssertionFailure(const char *file, int line, const char *function, const char *argName, const char *assertion);
+void KWQReportFatalError(const char *file, int line, const char *function, const char *format, ...) ;
+void KWQReportError(const char *file, int line, const char *function, const char *format, ...);
+void KWQLog(const char *file, int line, const char *function, KWQLogChannel *channel, const char *format, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+// ASSERT, ASSERT_WITH_MESSAGE, ASSERT_NOT_REACHED
+
+#if ASSERT_DISABLED
+
+#define ASSERT(assertion) ((void)0)
+#define ASSERT_WITH_MESSAGE(assertion, format, args...) ((void)0)
+#define ASSERT_NOT_REACHED() ((void)0)
+
+#else
+
+#define ASSERT(assertion) do \
+ if (!(assertion)) { \
+ KWQReportAssertionFailure(__FILE__, __LINE__, __PRETTY_FUNCTION__, #assertion); \
+ raise(SIGQUIT); \
+ } \
+while (0)
+#define ASSERT_WITH_MESSAGE(assertion, format, args...) do \
+ if (!(assertion)) { \
+ KWQReportAssertionFailureWithMessage(__FILE__, __LINE__, __PRETTY_FUNCTION__, #assertion, format, ## args); \
+ raise(SIGQUIT); \
+ } \
+while (0)
+#define ASSERT_NOT_REACHED() do { \
+ KWQReportAssertionFailure(__FILE__, __LINE__, __PRETTY_FUNCTION__, 0); \
+ raise(SIGQUIT); \
+} while (0)
+
+#endif
+
+// ASSERT_ARG
+
+#if ASSERT_ARG_DISABLED
+
+#define ASSERT_ARG(argName, assertion) ((void)0)
+
+#else
+
+#define ASSERT_ARG(argName, assertion) do \
+ if (!(assertion)) { \
+ KWQReportArgumentAssertionFailure(__FILE__, __LINE__, __PRETTY_FUNCTION__, #argName, #assertion); \
+ raise(SIGQUIT); \
+ } \
+while (0)
+
+#endif
+
+// FATAL
+
+#if FATAL_DISABLED
+#define FATAL(format, args...) ((void)0)
+#else
+#define FATAL(format, args...) do { \
+ KWQReportFatalError(__FILE__, __LINE__, __PRETTY_FUNCTION__, (format), ## args); \
+ raise(SIGQUIT); \
+} while (0)
+#endif
+
+// ERROR
+
+#if ERROR_DISABLED
+#define ERROR(format, args...) ((void)0)
+#else
+#define ERROR(format, args...) KWQReportError(__FILE__, __LINE__, __PRETTY_FUNCTION__, (format), ## args)
+#endif
+
+// LOG
+
+#if LOG_DISABLED
+#define LOG(channel, format, args...) ((void)0)
+#else
+#define LOG(channel, format, args...) KWQLog(__FILE__, __LINE__, __PRETTY_FUNCTION__, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), (format), ## args)
+#define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel)
+#define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel
+#endif
diff --git a/WebCore/kwq/KWQAssertions.m b/WebCore/kwq/KWQAssertions.m
new file mode 100644
index 0000000..a9333f1
--- /dev/null
+++ b/WebCore/kwq/KWQAssertions.m
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "KWQAssertions.h"
+
+static int (* vfprintf_no_warning)(FILE *, const char *, va_list) = vfprintf;
+
+static void vprintf_stderr_objc(const char *format, va_list args)
+{
+ if (!strstr(format, "%@")) {
+ vfprintf_no_warning(stderr, format, args);
+ } else {
+ fputs([[[[NSString alloc] initWithFormat:[NSString stringWithCString:format] arguments:args] autorelease] lossyCString], stderr);
+ }
+}
+
+void KWQReportAssertionFailure(const char *file, int line, const char *function, const char *assertion)
+{
+ if (assertion) {
+ fprintf(stderr, "=================\nASSERTION FAILED: %s (%s:%d %s)\n=================\n", assertion, file, line, function);
+ } else {
+ fprintf(stderr, "=================\nSHOULD NEVER BE REACHED (%s:%d %s)\n=================\n", file, line, function);
+ }
+}
+
+void KWQReportAssertionFailureWithMessage(const char *file, int line, const char *function, const char *assertion, const char *format, ...)
+{
+ fprintf(stderr, "=================\nASSERTION FAILED: ");
+ va_list args;
+ va_start(args, format);
+ vprintf_stderr_objc(format, args);
+ va_end(args);
+ fprintf(stderr, "\n%s (%s:%d %s)\n=================\n", assertion, file, line, function);
+}
+
+void KWQReportArgumentAssertionFailure(const char *file, int line, const char *function, const char *argName, const char *assertion)
+{
+ fprintf(stderr, "=================\nARGUMENT BAD: %s, %s (%s:%d %s)\n=================\n", argName, assertion, file, line, function);
+}
+
+void KWQReportFatalError(const char *file, int line, const char *function, const char *format, ...)
+{
+ fprintf(stderr, "=================\nFATAL ERROR: ");
+ va_list args;
+ va_start(args, format);
+ vprintf_stderr_objc(format, args);
+ va_end(args);
+ fprintf(stderr, "\n(%s:%d %s)\n=================\n", file, line, function);
+}
+
+void KWQReportError(const char *file, int line, const char *function, const char *format, ...)
+{
+ fprintf(stderr, "=================\nERROR: ");
+ va_list args;
+ va_start(args, format);
+ vprintf_stderr_objc(format, args);
+ va_end(args);
+ fprintf(stderr, "\n(%s:%d %s)\n=================\n", file, line, function);
+}
+
+void KWQLog(const char *file, int line, const char *function, KWQLogChannel *channel, const char *format, ...)
+{
+ if (channel->state == KWQLogChannelUninitialized) {
+ channel->state = KWQLogChannelOff;
+ NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithCString:channel->defaultName]];
+ if (logLevelString) {
+ unsigned logLevel;
+ if (![[NSScanner scannerWithString:logLevelString] scanHexInt:&logLevel]) {
+ NSLog(@"unable to parse hex value for %s (%@), logging is off", channel->defaultName, logLevelString);
+ }
+ if ((logLevel & channel->mask) == channel->mask) {
+ channel->state = KWQLogChannelOn;
+ }
+ }
+ }
+
+ if (channel->state != KWQLogChannelOn) {
+ return;
+ }
+
+ fprintf(stderr, "- %s:%d %s - ", file, line, function);
+ va_list args;
+ va_start(args, format);
+ vprintf_stderr_objc(format, args);
+ va_end(args);
+ if (format[strlen(format) - 1] != '\n')
+ putc('\n', stderr);
+}
diff --git a/WebCore/kwq/KWQChar.mm b/WebCore/kwq/KWQChar.mm
index 5593c43..642a0a4 100644
--- a/WebCore/kwq/KWQChar.mm
+++ b/WebCore/kwq/KWQChar.mm
@@ -24,7 +24,7 @@
*/
#import <qstring.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <Foundation/Foundation.h>
static UniChar scratchUniChar;
@@ -91,7 +91,7 @@ QChar QChar::upper() const
QChar::Direction QChar::direction() const
{
// FIXME: unimplemented because we don't do BIDI yet
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
if (c == ' ')
return DirWS;
return DirL;
@@ -100,7 +100,7 @@ QChar::Direction QChar::direction() const
bool QChar::mirrored() const
{
// FIXME: unimplemented because we don't do BIDI yet
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
// return whether character should be reversed if text direction is reversed
return false;
}
@@ -108,7 +108,7 @@ bool QChar::mirrored() const
QChar QChar::mirroredChar() const
{
// FIXME: unimplemented because we don't do BIDI yet
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
// return mirrored character if it is mirrored else return itself
return *this;
}
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index c1c78ad..b75cd37 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -27,7 +27,7 @@
#import <qnamespace.h>
#import <qstring.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
static void createStaticConstructorAutoreleasePool()
{
@@ -347,7 +347,7 @@ void QColor::setNamedColor(const QString &name)
setRgb(r, g, b);
}
else {
- KWQDEBUG("couldn't create color using name %s", name.ascii());
+ ERROR("couldn't create color using name %s", name.ascii());
[color release];
color = nil;
}
diff --git a/WebCore/kwq/KWQComboBox.mm b/WebCore/kwq/KWQComboBox.mm
index 9bc9219..bd6249a 100644
--- a/WebCore/kwq/KWQComboBox.mm
+++ b/WebCore/kwq/KWQComboBox.mm
@@ -25,7 +25,6 @@
#import <qcombobox.h>
-#import <kwqdebug.h>
#import <KWQKHTMLPartImpl.h>
#import <WebCoreBridge.h>
diff --git a/WebCore/kwq/KWQCompletion.mm b/WebCore/kwq/KWQCompletion.mm
index 8c280c4..5b48c25 100644
--- a/WebCore/kwq/KWQCompletion.mm
+++ b/WebCore/kwq/KWQCompletion.mm
@@ -24,15 +24,15 @@
*/
#import <KWQCompletion.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
void KCompletion::setItems(const QStringList &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
KCompletion *KCompletionBase::completionObject()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
diff --git a/WebCore/kwq/KWQCursor.mm b/WebCore/kwq/KWQCursor.mm
index c57e33d..00e1f0e 100644
--- a/WebCore/kwq/KWQCursor.mm
+++ b/WebCore/kwq/KWQCursor.mm
@@ -24,7 +24,7 @@
*/
#import <qcursor.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
const QCursor Qt::sizeAllCursor;
const QCursor Qt::splitHCursor;
@@ -45,7 +45,7 @@ QCursor::QCursor(NSCursor *cur)
QCursor::QCursor(const QPixmap &pixmap)
: cursor([[NSCursor arrowCursor] retain])
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QCursor::QCursor(const QCursor &other)
@@ -60,7 +60,7 @@ QCursor::~QCursor()
QPoint QCursor::pos()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QPoint();
}
diff --git a/WebCore/kwq/KWQDrawUtil.mm b/WebCore/kwq/KWQDrawUtil.mm
index d3edb45..fd75b98 100644
--- a/WebCore/kwq/KWQDrawUtil.mm
+++ b/WebCore/kwq/KWQDrawUtil.mm
@@ -23,7 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
#import <qdrawutil.h>
void qDrawShadePanel(QPainter *p, int x, int y, int w, int h, const QColorGroup &g, bool
diff --git a/WebCore/kwq/KWQEvent.mm b/WebCore/kwq/KWQEvent.mm
index 05ef378..6d09263 100644
--- a/WebCore/kwq/KWQEvent.mm
+++ b/WebCore/kwq/KWQEvent.mm
@@ -24,7 +24,7 @@
*/
#import <qevent.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QEvent::~QEvent()
{
@@ -57,57 +57,57 @@ QTimerEvent::QTimerEvent(int t)
QKeyEvent::QKeyEvent(Type t, int, int, int, const QString &, bool, ushort)
: QEvent(t)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
int QKeyEvent::key() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
Qt::ButtonState QKeyEvent::state() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return Qt::NoButton;
}
void QKeyEvent::accept()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
void QKeyEvent::ignore()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
bool QKeyEvent::isAutoRepeat() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return false;
}
QString QKeyEvent::text(void) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
int QKeyEvent::ascii(void) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
int QKeyEvent::count(void) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
bool QKeyEvent::isAccepted(void) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return false;
}
diff --git a/WebCore/kwq/KWQFontInfo.mm b/WebCore/kwq/KWQFontInfo.mm
index ab5208b..96026c1 100644
--- a/WebCore/kwq/KWQFontInfo.mm
+++ b/WebCore/kwq/KWQFontInfo.mm
@@ -24,7 +24,7 @@
*/
#import <qfontinfo.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QFontInfo::QFontInfo(const QFont &f)
: font(f)
@@ -33,6 +33,6 @@ QFontInfo::QFontInfo(const QFont &f)
bool QFontInfo::fixedPitch() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index d00481c..81933c6 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -30,7 +30,7 @@
#import <qfont.h>
#import <WebCoreTextRendererFactory.h>
#import <WebCoreTextRenderer.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
struct QFontMetricsPrivate
{
@@ -164,12 +164,12 @@ QSize QFontMetrics::size(int, const QString &qstring) const
int QFontMetrics::rightBearing(QChar) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
int QFontMetrics::leftBearing(QChar) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
diff --git a/WebCore/kwq/KWQFrame.mm b/WebCore/kwq/KWQFrame.mm
index 979db79..738f79c 100644
--- a/WebCore/kwq/KWQFrame.mm
+++ b/WebCore/kwq/KWQFrame.mm
@@ -25,8 +25,6 @@
#import <qframe.h>
-#import <kwqdebug.h>
-
void QFrame::setFrameStyle(int s)
{
_frameStyle = s;
diff --git a/WebCore/kwq/KWQHBox.mm b/WebCore/kwq/KWQHBox.mm
index 4922b47..a60ba19 100644
--- a/WebCore/kwq/KWQHBox.mm
+++ b/WebCore/kwq/KWQHBox.mm
@@ -25,7 +25,6 @@
#import <qhbox.h>
-#import <kwqdebug.h>
#import <KWQView.h>
// This class is ONLY used by FORM <input type=file> elements. It's used
diff --git a/WebCore/kwq/KWQInputDialog.mm b/WebCore/kwq/KWQInputDialog.mm
index 15c6ed5..d282d7c 100644
--- a/WebCore/kwq/KWQInputDialog.mm
+++ b/WebCore/kwq/KWQInputDialog.mm
@@ -24,10 +24,10 @@
*/
#import <qinputdialog.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QString QInputDialog::getText(const QString &, const QString &, QLineEdit::EchoMode, const QString &, bool *)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
return QString();
}
diff --git a/WebCore/kwq/KWQInvisibleButton.mm b/WebCore/kwq/KWQInvisibleButton.mm
index ff4ea76..3a5bb4a 100644
--- a/WebCore/kwq/KWQInvisibleButton.mm
+++ b/WebCore/kwq/KWQInvisibleButton.mm
@@ -25,7 +25,6 @@
#import <KWQInvisibleButton.h>
-#import <kwqdebug.h>
#import <qevent.h>
#import <khtmlview.h>
#import <render_form.h>
diff --git a/WebCore/kwq/KWQKConfigBase.mm b/WebCore/kwq/KWQKConfigBase.mm
index e25e492..6d45bd0 100644
--- a/WebCore/kwq/KWQKConfigBase.mm
+++ b/WebCore/kwq/KWQKConfigBase.mm
@@ -25,7 +25,7 @@
#import <kconfig.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <qcolor.h>
#import <qstringlist.h>
#import <WebCoreViewFactory.h>
@@ -61,7 +61,7 @@ void KConfig::setGroup(const QString &pGroup)
void KConfig::writeEntry(const QString &pKey, const QStringList &rValue,
char sep, bool bPersistent, bool bGlobal, bool bNLS)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
@@ -94,7 +94,7 @@ QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
}
}
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
@@ -103,7 +103,7 @@ int KConfig::readNumEntry(const char *pKey, int nDefault) const
if (impl->isPluginInfo) {
return [[[WebCoreViewFactory sharedFactory] pluginsInfo] count];
}
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return nDefault;
}
@@ -116,27 +116,27 @@ unsigned int KConfig::readUnsignedNumEntry(const char *pKey, unsigned int nDefau
return 3;
}
}
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return nDefault;
}
bool KConfig::readBoolEntry(const char *pKey, bool nDefault) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return nDefault;
}
QColor KConfig::readColorEntry(const char *pKey, const QColor *pDefault) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return pDefault ? *pDefault : QColor(0,0,0);
}
QStringList KConfig::readListEntry(const QString &pKey, char sep) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QStringList();
}
diff --git a/WebCore/kwq/KWQKFileDialog.mm b/WebCore/kwq/KWQKFileDialog.mm
index 9a13ddf..3fbad9f 100644
--- a/WebCore/kwq/KWQKFileDialog.mm
+++ b/WebCore/kwq/KWQKFileDialog.mm
@@ -24,11 +24,11 @@
*/
#import <kfiledialog.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QString KFileDialog::getOpenFileName(const QString &startDir,
const QString &filter, QWidget *parent, const QString &caption)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
diff --git a/WebCore/kwq/KWQKFileItem.mm b/WebCore/kwq/KWQKFileItem.mm
index 45eca6b..a133934 100644
--- a/WebCore/kwq/KWQKFileItem.mm
+++ b/WebCore/kwq/KWQKFileItem.mm
@@ -25,16 +25,16 @@
#import <kfileitem.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
KFileItem::KFileItem(const KIO::UDSEntry &, const KURL &, bool, bool)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
bool KFileItem::isDir() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
diff --git a/WebCore/kwq/KWQKGlobalSettings.mm b/WebCore/kwq/KWQKGlobalSettings.mm
index 86369e5..8fa6f84 100644
--- a/WebCore/kwq/KWQKGlobalSettings.mm
+++ b/WebCore/kwq/KWQKGlobalSettings.mm
@@ -27,7 +27,7 @@
#import <kglobalsettings.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QFont KGlobalSettings::generalFont()
{
@@ -49,7 +49,7 @@ QFont KGlobalSettings::menuFont()
int KGlobalSettings::contrast()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 8b41637..bb0e2cb 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -38,7 +38,7 @@
#import <WebFoundation/WebNSURLExtras.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#undef _KWQ_TIMING
@@ -160,7 +160,7 @@ void KWQKHTMLPartImpl::slotData(NSString *encoding, bool forceEncoding, const ch
part->setEncoding(QString::null, false);
}
- KWQ_ASSERT(d->m_doc != NULL);
+ ASSERT(d->m_doc != NULL);
part->write(bytes, length);
}
@@ -214,7 +214,7 @@ void KWQKHTMLPartImpl::urlSelected(const QString &url, int button, int state, co
bool KWQKHTMLPartImpl::requestFrame( RenderPart *frame, const QString &url, const QString &frameName,
const QStringList ¶ms, bool isIFrame )
{
- KWQ_ASSERT(!frameExists(frameName));
+ ASSERT(!frameExists(frameName));
NSURL *childURL = part->completeURL(url).getNSURL();
if (childURL == nil) {
@@ -222,7 +222,7 @@ bool KWQKHTMLPartImpl::requestFrame( RenderPart *frame, const QString &url, cons
return false;
}
- KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", frameName.ascii());
+ LOG(Frames, "name %s", frameName.ascii());
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
WebCoreBridge *childBridge = [_bridge createChildFrameNamed:frameName.getNSString() withURL:childURL
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 8b41637..bb0e2cb 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -38,7 +38,7 @@
#import <WebFoundation/WebNSURLExtras.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#undef _KWQ_TIMING
@@ -160,7 +160,7 @@ void KWQKHTMLPartImpl::slotData(NSString *encoding, bool forceEncoding, const ch
part->setEncoding(QString::null, false);
}
- KWQ_ASSERT(d->m_doc != NULL);
+ ASSERT(d->m_doc != NULL);
part->write(bytes, length);
}
@@ -214,7 +214,7 @@ void KWQKHTMLPartImpl::urlSelected(const QString &url, int button, int state, co
bool KWQKHTMLPartImpl::requestFrame( RenderPart *frame, const QString &url, const QString &frameName,
const QStringList ¶ms, bool isIFrame )
{
- KWQ_ASSERT(!frameExists(frameName));
+ ASSERT(!frameExists(frameName));
NSURL *childURL = part->completeURL(url).getNSURL();
if (childURL == nil) {
@@ -222,7 +222,7 @@ bool KWQKHTMLPartImpl::requestFrame( RenderPart *frame, const QString &url, cons
return false;
}
- KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", frameName.ascii());
+ LOG(Frames, "name %s", frameName.ascii());
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
WebCoreBridge *childBridge = [_bridge createChildFrameNamed:frameName.getNSString() withURL:childURL
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
index b57e4e3..670d57b 100644
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ b/WebCore/kwq/KWQKHTMLSettings.mm
@@ -24,7 +24,7 @@
*/
#import <khtml_settings.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
QString KHTMLSettings::stdFontName() const
{
@@ -114,7 +114,7 @@ bool KHTMLSettings::isJavaEnabled() const
bool KHTMLSettings::autoLoadImages() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return true;
}
diff --git a/WebCore/kwq/KWQKIONetAccess.mm b/WebCore/kwq/KWQKIONetAccess.mm
index d51bd52..5b87988 100644
--- a/WebCore/kwq/KWQKIONetAccess.mm
+++ b/WebCore/kwq/KWQKIONetAccess.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <netaccess.h>
//FIX ME:
@@ -33,14 +33,14 @@ namespace KIO {
bool NetAccess::stat(const KURL &, KIO::UDSEntry &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
QString NetAccess::lastErrorString()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
if (tempQString == NULL) {
tempQString = new QString();
}
@@ -51,14 +51,14 @@ QString NetAccess::lastErrorString()
bool NetAccess::download(const KURL &, QString &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
void NetAccess::removeTempFile(const QString &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
} // namespace KIO
diff --git a/WebCore/kwq/KWQKIconLoader.mm b/WebCore/kwq/KWQKIconLoader.mm
index 9acbf3b..920123d 100644
--- a/WebCore/kwq/KWQKIconLoader.mm
+++ b/WebCore/kwq/KWQKIconLoader.mm
@@ -23,11 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <kiconloader.h>
QPixmap KIconLoader::loadIcon(const QString &name, int group, int size, int state) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QPixmap();
}
diff --git a/WebCore/kwq/KWQKJob.mm b/WebCore/kwq/KWQKJob.mm
index f52c756..20ce502 100644
--- a/WebCore/kwq/KWQKJob.mm
+++ b/WebCore/kwq/KWQKJob.mm
@@ -24,13 +24,13 @@
*/
#import <job.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
namespace KIO {
void http_update_cache(const KURL &, bool, time_t)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
} // namespace KIO
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index 98d7b88..b336b33 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <qstring.h>
#import <jobclasses.h>
@@ -85,7 +85,7 @@ void TransferJob::setError(int e)
QString TransferJob::errorText() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
diff --git a/WebCore/kwq/KWQKLocale.mm b/WebCore/kwq/KWQKLocale.mm
index ebddf8d..76affe9 100644
--- a/WebCore/kwq/KWQKLocale.mm
+++ b/WebCore/kwq/KWQKLocale.mm
@@ -24,7 +24,7 @@
*/
#import <klocale.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <qstring.h>
@interface KWQKLocaleBundleDummy : NSObject { }
@@ -41,12 +41,12 @@ QString i18n(const char *text)
QString KLocale::language() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return "en_US";
}
QStringList KLocale::languageList() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QStringList::split(",", "us");
}
diff --git a/WebCore/kwq/KWQKMimeType.mm b/WebCore/kwq/KWQKMimeType.mm
index 534b60c..b2d3d28 100644
--- a/WebCore/kwq/KWQKMimeType.mm
+++ b/WebCore/kwq/KWQKMimeType.mm
@@ -24,44 +24,44 @@
*/
#import <kmimetype.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
KMimeType::Ptr KMimeType::findByURL(const KURL &, mode_t, bool, bool)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return KMimeType::Ptr();
}
KMimeType::~KMimeType()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QString KMimeType::name() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
QString KMimeType::comment() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
KMimeType::Ptr KMimeType::mimeType(QString serviceType)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return KMimeType::Ptr();
}
QString KMimeType::defaultMimeType()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
diff --git a/WebCore/kwq/KWQKPartsBrowserInterface.mm b/WebCore/kwq/KWQKPartsBrowserInterface.mm
index 5085bcc..91c5276 100644
--- a/WebCore/kwq/KWQKPartsBrowserInterface.mm
+++ b/WebCore/kwq/KWQKPartsBrowserInterface.mm
@@ -25,13 +25,13 @@
#import <browserinterface.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
namespace KParts {
void BrowserInterface::callMethod(const char *name, const QVariant &argument)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
} // namespace KParts
diff --git a/WebCore/kwq/KWQKPartsEvent.mm b/WebCore/kwq/KWQKPartsEvent.mm
index 509c91a..c73c416 100644
--- a/WebCore/kwq/KWQKPartsEvent.mm
+++ b/WebCore/kwq/KWQKPartsEvent.mm
@@ -23,7 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
#import <event.h>
class QPainter;
diff --git a/WebCore/kwq/KWQKSimpleConfig.mm b/WebCore/kwq/KWQKSimpleConfig.mm
index 13d2126..ebc69c6 100644
--- a/WebCore/kwq/KWQKSimpleConfig.mm
+++ b/WebCore/kwq/KWQKSimpleConfig.mm
@@ -23,12 +23,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <ksimpleconfig.h>
KSimpleConfig::KSimpleConfig(const QString &s, bool bReadOnly) : KConfig (s, bReadOnly)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index aeee00a..c18efab 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -24,8 +24,6 @@
*/
#import <kurl.h>
-#import <kwqdebug.h>
-
typedef enum {
// alpha
diff --git a/WebCore/kwq/KWQKWin.mm b/WebCore/kwq/KWQKWin.mm
index db265b2..8e80fe8 100644
--- a/WebCore/kwq/KWQKWin.mm
+++ b/WebCore/kwq/KWQKWin.mm
@@ -24,7 +24,7 @@
*/
#import <kwin.h>
-#import <kwqdebug.h>
+
#import <qwidget.h>
KWin::Info KWin::info(long win)
diff --git a/WebCore/kwq/KWQKWinModule.mm b/WebCore/kwq/KWQKWinModule.mm
index 98a9035..1de9646 100644
--- a/WebCore/kwq/KWQKWinModule.mm
+++ b/WebCore/kwq/KWQKWinModule.mm
@@ -24,7 +24,6 @@
*/
#import <kwinmodule.h>
-#import <kwqdebug.h>
QRect KWinModule::workArea() const
{
diff --git a/WebCore/kwq/KWQKnetaccess.mm b/WebCore/kwq/KWQKnetaccess.mm
index d51bd52..5b87988 100644
--- a/WebCore/kwq/KWQKnetaccess.mm
+++ b/WebCore/kwq/KWQKnetaccess.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <netaccess.h>
//FIX ME:
@@ -33,14 +33,14 @@ namespace KIO {
bool NetAccess::stat(const KURL &, KIO::UDSEntry &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
QString NetAccess::lastErrorString()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
if (tempQString == NULL) {
tempQString = new QString();
}
@@ -51,14 +51,14 @@ QString NetAccess::lastErrorString()
bool NetAccess::download(const KURL &, QString &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
void NetAccess::removeTempFile(const QString &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
} // namespace KIO
diff --git a/WebCore/kwq/KWQLabel.mm b/WebCore/kwq/KWQLabel.mm
index 4299edf..8099129 100644
--- a/WebCore/kwq/KWQLabel.mm
+++ b/WebCore/kwq/KWQLabel.mm
@@ -25,8 +25,6 @@
#import <qlabel.h>
-#import <kwqdebug.h>
-
QLabel::QLabel(const QString &, QWidget *)
{
}
diff --git a/WebCore/kwq/KWQLineEdit.mm b/WebCore/kwq/KWQLineEdit.mm
index 704c6da..3ea7ec5 100644
--- a/WebCore/kwq/KWQLineEdit.mm
+++ b/WebCore/kwq/KWQLineEdit.mm
@@ -26,7 +26,7 @@
#import <qlineedit.h>
#import <KWQNSTextField.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <WebCoreTextRendererFactory.h>
// This replicates constants from [NSTextFieldCell drawingRectForBounds].
@@ -97,7 +97,7 @@ void QLineEdit::setReadOnly(bool flag)
bool QLineEdit::frame() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
diff --git a/WebCore/kwq/KWQListBox.mm b/WebCore/kwq/KWQListBox.mm
index abd463a..788a550 100644
--- a/WebCore/kwq/KWQListBox.mm
+++ b/WebCore/kwq/KWQListBox.mm
@@ -22,11 +22,10 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
-#import <KWQView.h>
#import <KWQListBox.h>
+#import <KWQView.h>
@interface KWQBrowserDelegate : NSObject
{
diff --git a/WebCore/kwq/KWQListImpl.mm b/WebCore/kwq/KWQListImpl.mm
index d24fece..a6a9f58 100644
--- a/WebCore/kwq/KWQListImpl.mm
+++ b/WebCore/kwq/KWQListImpl.mm
@@ -28,7 +28,7 @@
#import <cstddef>
#import <algorithm>
#import <CoreFoundation/CFArray.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
class KWQListNode
{
@@ -479,8 +479,8 @@ void KWQListImpl::swap(KWQListImpl &other)
{
using std::swap;
- KWQ_ASSERT(iterators == NULL);
- KWQ_ASSERT(other.iterators == NULL);
+ ASSERT(iterators == NULL);
+ ASSERT(other.iterators == NULL);
swap(head, other.head);
swap(tail, other.tail);
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 9112291..08d0983 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -36,7 +36,7 @@
#import <WebCoreBridge.h>
#import <WebCoreResourceLoader.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
using khtml::CachedObject;
using khtml::CachedImage;
@@ -94,7 +94,7 @@ using KIO::TransferJob;
bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
{
- KWQDEBUGLEVEL(KWQ_LOG_LOADING, "Serving request for base %s, url %s",
+ LOG(Loading, "Serving request for base %s, url %s",
request->m_docLoader->part()->baseURL().url().latin1(),
request->object->url().string().latin1());
@@ -148,7 +148,7 @@ void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
// Notify the caller that we "loaded".
WebCoreBridge *bridge = ((KHTMLPart *)loader->part())->impl->bridge();
NSURL *URL = [[NSURL alloc] initWithString:cachedObject->url().string().getNSString()];
- KWQ_ASSERT(URL);
+ ASSERT(URL);
CachedImage *cachedImage = dynamic_cast<CachedImage *>(cachedObject);
[bridge objectLoadedFromCache:URL size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
[URL release];
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 9112291..08d0983 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -36,7 +36,7 @@
#import <WebCoreBridge.h>
#import <WebCoreResourceLoader.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
using khtml::CachedObject;
using khtml::CachedImage;
@@ -94,7 +94,7 @@ using KIO::TransferJob;
bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
{
- KWQDEBUGLEVEL(KWQ_LOG_LOADING, "Serving request for base %s, url %s",
+ LOG(Loading, "Serving request for base %s, url %s",
request->m_docLoader->part()->baseURL().url().latin1(),
request->object->url().string().latin1());
@@ -148,7 +148,7 @@ void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
// Notify the caller that we "loaded".
WebCoreBridge *bridge = ((KHTMLPart *)loader->part())->impl->bridge();
NSURL *URL = [[NSURL alloc] initWithString:cachedObject->url().string().getNSString()];
- KWQ_ASSERT(URL);
+ ASSERT(URL);
CachedImage *cachedImage = dynamic_cast<CachedImage *>(cachedObject);
[bridge objectLoadedFromCache:URL size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
[URL release];
diff --git a/WebCore/kwq/KWQLogging.h b/WebCore/kwq/KWQLogging.h
new file mode 100644
index 0000000..cf2509b
--- /dev/null
+++ b/WebCore/kwq/KWQLogging.h
@@ -0,0 +1,19 @@
+//
+// KWQLogging.h
+// WebCore
+//
+// Created by Darin Adler on Sun Sep 08 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <KWQAssertions.h>
+
+#ifndef LOG_CHANNEL_PREFIX
+#define LOG_CHANNEL_PREFIX KWQLog
+#endif
+
+extern KWQLogChannel KWQLogNeverImplemented;
+extern KWQLogChannel KWQLogNotYetImplemented;
+
+extern KWQLogChannel KWQLogFrames;
+extern KWQLogChannel KWQLogLoading;
diff --git a/WebCore/kwq/KWQLogging.m b/WebCore/kwq/KWQLogging.m
new file mode 100644
index 0000000..4ef8528
--- /dev/null
+++ b/WebCore/kwq/KWQLogging.m
@@ -0,0 +1,15 @@
+//
+// KWQLogging.m
+// WebCore
+//
+// Created by Darin Adler on Sun Sep 08 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "KWQLogging.h"
+
+KWQLogChannel KWQLogNeverImplemented = { 0x00000001, "WebCoreLogLevel", KWQLogChannelUninitialized };
+KWQLogChannel KWQLogNotYetImplemented = { 0x00000002, "WebCoreLogLevel", KWQLogChannelUninitialized };
+
+KWQLogChannel KWQLogFrames = { 0x00000010, "WebCoreLogLevel", KWQLogChannelUninitialized };
+KWQLogChannel KWQLogLoading = { 0x00000020, "WebCoreLogLevel", KWQLogChannelUninitialized };
diff --git a/WebCore/kwq/KWQObject.mm b/WebCore/kwq/KWQObject.mm
index 7c772f5..635e9b3 100644
--- a/WebCore/kwq/KWQObject.mm
+++ b/WebCore/kwq/KWQObject.mm
@@ -27,7 +27,7 @@
#import <qvariant.h>
#import <qguardedptr.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
#import <KWQSignal.h>
#import <KWQSlot.h>
@@ -91,7 +91,7 @@ QObject::QObject(QObject *parent, const char *name)
QObject::~QObject()
{
- KWQ_ASSERT(m_signalListHead == 0);
+ ASSERT(m_signalListHead == 0);
}
@interface KWQTimerCallback : NSObject
diff --git a/WebCore/kwq/KWQPaintDeviceMetrics.mm b/WebCore/kwq/KWQPaintDeviceMetrics.mm
index 76cd040..fd9aea2 100644
--- a/WebCore/kwq/KWQPaintDeviceMetrics.mm
+++ b/WebCore/kwq/KWQPaintDeviceMetrics.mm
@@ -25,7 +25,7 @@
#import <qpaintdevicemetrics.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
QPaintDeviceMetrics::QPaintDeviceMetrics(const QPaintDevice *)
{
@@ -43,12 +43,12 @@ int QPaintDeviceMetrics::depth() const
int QPaintDeviceMetrics::width() const
{
- _logPartiallyImplemented();
+ ERROR("returning 800 for paint device width");
return 800;
}
int QPaintDeviceMetrics::height() const
{
- _logPartiallyImplemented();
+ ERROR("returning 800 for paint device height");
return 800;
}
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index e8fe59e..e29718e 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -30,7 +30,7 @@
#import <qstack.h>
#import <qpoint.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
#import <WebCoreTextRendererFactory.h>
#import <WebCoreTextRenderer.h>
@@ -123,7 +123,7 @@ void QPainter::save()
void QPainter::restore()
{
if (data->stack.isEmpty()) {
- KWQDEBUG("ERROR void QPainter::restore() stack is empty\n");
+ ERROR("ERROR void QPainter::restore() stack is empty");
return;
}
QPState *ps = data->stack.pop();
@@ -240,7 +240,7 @@ void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)
if (data->state.pen.style() != NoPen) {
if (w != h) {
- KWQDEBUG("ERROR (INCOMPLETE IMPLEMENTATION) void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)\nOnly supports drawing arcs on a circle.\n");
+ ERROR("only supports drawing arcs on a circle");
}
NSBezierPath *path = [[NSBezierPath alloc] init];
diff --git a/WebCore/kwq/KWQPixmap.mm b/WebCore/kwq/KWQPixmap.mm
index 9466022..d04e208 100644
--- a/WebCore/kwq/KWQPixmap.mm
+++ b/WebCore/kwq/KWQPixmap.mm
@@ -25,7 +25,6 @@
#import <qpixmap.h>
-#import <kwqdebug.h>
#import <WebCoreImageRenderer.h>
#import <WebCoreImageRendererFactory.h>
diff --git a/WebCore/kwq/KWQRegion.mm b/WebCore/kwq/KWQRegion.mm
index 8a06bad..4b2a664 100644
--- a/WebCore/kwq/KWQRegion.mm
+++ b/WebCore/kwq/KWQRegion.mm
@@ -25,8 +25,6 @@
#import <qregion.h>
-#import <kwqdebug.h>
-
QRegion::QRegion(const QRect &rect)
: path([[NSBezierPath bezierPathWithRect:rect] retain])
{
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 1bbbe04..bd9546b 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -27,7 +27,7 @@
#import <WebCoreFrameView.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
/*
This class implementation does NOT actually emulate the Qt QScrollView.
@@ -174,19 +174,19 @@ void QScrollView::setContentsPos(int x, int y)
void QScrollView::setVScrollBarMode(ScrollBarMode)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
}
void QScrollView::setHScrollBarMode(ScrollBarMode)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
}
void QScrollView::addChild(QWidget* child, int x, int y)
{
NSView *thisView, *thisDocView, *subview;
- KWQ_ASSERT(child != this);
+ ASSERT(child != this);
child->move(x, y);
@@ -204,7 +204,7 @@ void QScrollView::addChild(QWidget* child, int x, int y)
subview = [subview superview];
}
- KWQ_ASSERT(subview != thisView);
+ ASSERT(subview != thisView);
if ([subview superview] == thisView) {
return;
@@ -212,7 +212,7 @@ void QScrollView::addChild(QWidget* child, int x, int y)
[subview removeFromSuperview];
- KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subview, [[[subview class] className] cString], x, y, (int)[subview frame].size.width, (int)[subview frame].size.height);
+ LOG(Frames, "Adding %p %@ at (%d,%d) w %d h %d\n", subview, [[subview class] className], x, y, (int)[subview frame].size.width, (int)[subview frame].size.height);
[thisView addSubview:subview];
}
@@ -223,12 +223,12 @@ void QScrollView::removeChild(QWidget* child)
void QScrollView::resizeContents(int w, int h)
{
- KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
+ LOG(Frames, "%p %@ at w %d h %d\n", getView(), [[getView() class] className], w, h);
NSView *view = getView();
if ([view _KWQ_isScrollView]){
view = [view _KWQ_getDocumentView];
- KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", view, [[[view class] className] cString], w, h);
+ LOG(Frames, "%p %@ at w %d h %d\n", view, [[view class] className], w, h);
if (w < 0)
w = 0;
if (h < 0)
@@ -256,7 +256,7 @@ void QScrollView::updateContents(const QRect &rect)
void QScrollView::repaintContents(int x, int y, int w, int h, bool erase)
{
- KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
+ LOG(Frames, "%p %@ at (%d,%d) w %d h %d\n", getView(), [[getView() class] className], x, y, w, h);
}
QPoint QScrollView::contentsToViewport(const QPoint &p)
@@ -296,7 +296,7 @@ void QScrollView::viewportToContents(int vx, int vy, int& x, int& y)
void QScrollView::setStaticBackground(bool)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
}
void QScrollView::resizeEvent(QResizeEvent *)
@@ -305,10 +305,10 @@ void QScrollView::resizeEvent(QResizeEvent *)
void QScrollView::ensureVisible(int,int)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
}
void QScrollView::ensureVisible(int,int,int,int)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
}
diff --git a/WebCore/kwq/KWQSlot.mm b/WebCore/kwq/KWQSlot.mm
index 5e330df..b5bf1b5 100644
--- a/WebCore/kwq/KWQSlot.mm
+++ b/WebCore/kwq/KWQSlot.mm
@@ -25,7 +25,7 @@
#import "KWQSlot.h"
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
#import <dom_docimpl.h>
#import <khtml_part.h>
@@ -56,37 +56,37 @@ enum FunctionNumber {
KWQSlot::KWQSlot(QObject *object, const char *member) : m_object(0)
{
if (KWQNamesMatch(member, SIGNAL(finishedParsing()))) {
- KWQ_ASSERT(dynamic_cast<DocumentImpl *>(object));
+ ASSERT(dynamic_cast<DocumentImpl *>(object));
m_function = signalFinishedParsing;
} else if (KWQNamesMatch(member, SLOT(slotAutoScroll()))) {
- KWQ_ASSERT(dynamic_cast<KHTMLPart *>(object));
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
m_function = slotAutoScroll;
} else if (KWQNamesMatch(member, SLOT(slotClicked()))) {
- KWQ_ASSERT(dynamic_cast<RenderFormElement *>(object));
+ ASSERT(dynamic_cast<RenderFormElement *>(object));
m_function = slotClicked;
} else if (KWQNamesMatch(member, SLOT(slotFinishedParsing()))) {
- KWQ_ASSERT(dynamic_cast<KHTMLPart *>(object));
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
m_function = slotFinishedParsing;
} else if (KWQNamesMatch(member, SLOT(slotRedirect()))) {
- KWQ_ASSERT(dynamic_cast<KHTMLPart *>(object));
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
m_function = slotRedirect;
} else if (KWQNamesMatch(member, SLOT(slotReturnPressed()))) {
- KWQ_ASSERT(dynamic_cast<RenderLineEdit *>(object) || dynamic_cast<RenderFileButton *>(object));
+ ASSERT(dynamic_cast<RenderLineEdit *>(object) || dynamic_cast<RenderFileButton *>(object));
m_function = slotReturnPressed;
} else if (KWQNamesMatch(member, SLOT(slotSelected(int)))) {
- KWQ_ASSERT(dynamic_cast<RenderSelect *>(object));
+ ASSERT(dynamic_cast<RenderSelect *>(object));
m_function = slotSelected;
} else if (KWQNamesMatch(member, SLOT(slotSelectionChanged()))) {
- KWQ_ASSERT(dynamic_cast<RenderSelect *>(object));
+ ASSERT(dynamic_cast<RenderSelect *>(object));
m_function = slotSelectionChanged;
} else if (KWQNamesMatch(member, SLOT(slotStateChanged(int)))) {
- KWQ_ASSERT(dynamic_cast<RenderCheckBox *>(object));
+ ASSERT(dynamic_cast<RenderCheckBox *>(object));
m_function = slotStateChanged;
} else if (KWQNamesMatch(member, SLOT(slotTextChanged()))) {
- KWQ_ASSERT(dynamic_cast<RenderTextArea *>(object));
+ ASSERT(dynamic_cast<RenderTextArea *>(object));
m_function = slotTextChanged;
} else if (KWQNamesMatch(member, SLOT(slotTextChanged(const QString &)))) {
- KWQ_ASSERT(dynamic_cast<RenderLineEdit *>(object) || dynamic_cast<RenderFileButton *>(object));
+ ASSERT(dynamic_cast<RenderLineEdit *>(object) || dynamic_cast<RenderFileButton *>(object));
m_function = slotTextChangedWithString;
} else {
NSLog(@"trying to create a slot for unknown member %s", member);
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 978c38d..1ce82ed 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -24,16 +24,13 @@
*/
#import <Foundation/Foundation.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <qstring.h>
#import <qregexp.h>
#import <stdio.h>
#define CHECK_FOR_HANDLE_LEAKS 0
-// Oops. I jumped the gun. Here's a stopgap.
-#define FATAL(x) ((void)0)
-
// Why can't I find this in a header anywhere? It's too bad we have
// to wire knowledge of allocation sizes, but it makes a huge diffence.
extern "C" {
@@ -453,7 +450,7 @@ QStringData **QString::makeSharedNullHandle()
QStringData::~QStringData()
{
- KWQ_ASSERT(refCount == 0);
+ ASSERT(refCount == 0);
// Ack! The destcructor will be called when the QString is deleted.
if ( _unicode && !_isUnicodeInternal)
@@ -478,7 +475,7 @@ inline char *QStringData::ascii()
void QStringData::increaseAsciiSize(uint size)
{
- KWQ_ASSERT(this != QString::shared_null);
+ ASSERT(this != QString::shared_null);
uint newSize = (uint)ALLOC_CHAR_GOOD_SIZE(size);
char *prev = 0;
@@ -532,7 +529,7 @@ inline QChar *QStringData::unicode()
void QStringData::increaseUnicodeSize(uint size)
{
- KWQ_ASSERT(this != QString::shared_null);
+ ASSERT(this != QString::shared_null);
uint newSize = (uint)ALLOC_QCHAR_GOOD_SIZE(size);
QChar *prev = 0;
@@ -570,7 +567,7 @@ void QStringData::increaseUnicodeSize(uint size)
char *QStringData::makeAscii()
{
- KWQ_ASSERT(this != QString::shared_null);
+ ASSERT(this != QString::shared_null);
if (_isUnicodeValid){
QChar copyBuf[QS_INTERNAL_BUFFER_CHARS];
@@ -618,7 +615,7 @@ char *QStringData::makeAscii()
QChar *QStringData::makeUnicode()
{
- KWQ_ASSERT(this != QString::shared_null);
+ ASSERT(this != QString::shared_null);
if (_isAsciiValid){
char copyBuf[QS_INTERNAL_BUFFER_CHARS];
@@ -775,8 +772,8 @@ QString::~QString()
QStringData **oldHandle = dataHandle;
QStringData *oldData = *oldHandle;
- KWQ_ASSERT(oldHandle);
- KWQ_ASSERT(oldData->refCount != 0);
+ ASSERT(oldHandle);
+ ASSERT(oldData->refCount != 0);
// Only free the handle if no other string has a reference to the
// data. The handle will be freed by the string that has the
@@ -790,7 +787,7 @@ QString::~QString()
// if *dataHandle points to our internal QStringData.
oldData->deref();
- KWQ_ASSERT(oldData != &internalData || oldData->refCount == 0);
+ ASSERT(oldData != &internalData || oldData->refCount == 0);
if (needToFreeHandle)
freeHandle(oldHandle);
@@ -2387,7 +2384,7 @@ void QString::fill(QChar qc, int len)
if (len == 0) {
if (dataHandle != shared_null_handle) {
- KWQ_ASSERT(dataHandle[0]->refCount == 1);
+ ASSERT(dataHandle[0]->refCount == 1);
deref();
freeHandle(dataHandle);
dataHandle = makeSharedNullHandle();
@@ -2414,13 +2411,13 @@ void QString::fill(QChar qc, int len)
void QString::compose()
{
// FIXME: unimplemented because we don't do ligatures yet
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QString QString::visual()
{
// FIXME: unimplemented because we don't do BIDI yet
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString(*this);
}
diff --git a/WebCore/kwq/KWQTextCodec.mm b/WebCore/kwq/KWQTextCodec.mm
index 004de4c..a8231c3 100644
--- a/WebCore/kwq/KWQTextCodec.mm
+++ b/WebCore/kwq/KWQTextCodec.mm
@@ -25,7 +25,6 @@
#import <qtextcodec.h>
-#import <kwqdebug.h>
#import <KWQCharsets.h>
static CFMutableDictionaryRef encodingToCodec = NULL;
diff --git a/WebCore/kwq/KWQTextStream.mm b/WebCore/kwq/KWQTextStream.mm
index 55dd537..4aee41e 100644
--- a/WebCore/kwq/KWQTextStream.mm
+++ b/WebCore/kwq/KWQTextStream.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <qtextstream.h>
@@ -31,51 +31,51 @@
QTextStream::QTextStream()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QTextStream::QTextStream(QByteArray, int)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QTextStream::QTextStream(QString *, int)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QTextStream::~QTextStream()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QTextStream &QTextStream::operator<<(char)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return *this;
}
QTextStream &QTextStream::operator<<(const char *)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return *this;
}
QTextStream &QTextStream::operator<<(const QCString &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return *this;
}
QTextStream &QTextStream::operator<<(const QString &)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return *this;
}
@@ -84,13 +84,13 @@ QTextStream &QTextStream::operator<<(const QString &)
QTextIStream::QTextIStream(QString *)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QString QTextIStream::readLine()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
@@ -99,36 +99,36 @@ QString QTextIStream::readLine()
QTextOStream::QTextOStream(QString *)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QTextOStream::QTextOStream(QByteArray)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QString QTextOStream::readLine()
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
QTextStream &QTextStream::operator<<(QTextStream &(*const &)(QTextStream &))
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return *this;
}
QTextStream &QTextStream::operator<<(void const *)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return *this;
}
QTextStream &endl(QTextStream& stream)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return stream;
}
diff --git a/WebCore/kwq/KWQTimer.mm b/WebCore/kwq/KWQTimer.mm
index 27446e3..408c51a 100644
--- a/WebCore/kwq/KWQTimer.mm
+++ b/WebCore/kwq/KWQTimer.mm
@@ -25,7 +25,7 @@
#import <qtimer.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
@interface KWQTimerTarget : NSObject
{
@@ -92,7 +92,7 @@ void QTimer::stop()
void QTimer::setMonitor(void (*monitorFunction)(void *context), void *context)
{
- KWQ_ASSERT(!m_monitorFunction);
+ ASSERT(!m_monitorFunction);
m_monitorFunction = monitorFunction;
m_monitorFunctionContext = context;
}
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 75021bb..a90e174 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -27,7 +27,7 @@
#import <KWQView.h>
#import <WebCoreFrameView.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <KWQWindowWidget.h>
#import <khtmlview.h>
@@ -206,7 +206,7 @@ void QWidget::setFocus()
void QWidget::clearFocus()
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
}
QWidget::FocusPolicy QWidget::focusPolicy() const
@@ -315,7 +315,7 @@ bool QWidget::event(QEvent *)
bool QWidget::focusNextPrevChild(bool)
{
- _logNeverImplemented();
+ LOG(NeverImplemented, "never implemented");
return TRUE;
}
@@ -328,7 +328,7 @@ void QWidget::setFrameGeometry(const QRect &rect)
{
NSView *view = getView();
- KWQ_ASSERT(view);
+ ASSERT(view);
// A QScrollView is a widget only used to represent a frame. If
// this widget's view is a WebCoreFrameView the we resize it's containing
@@ -336,7 +336,7 @@ void QWidget::setFrameGeometry(const QRect &rect)
// will be autosized.
if ([view conformsToProtocol:@protocol(WebCoreFrameView)]) {
view = [view superview];
- KWQ_ASSERT(view);
+ ASSERT(view);
}
[view setFrame:rect];
diff --git a/WebCore/kwq/KWQXml.mm b/WebCore/kwq/KWQXml.mm
index 311fa07..b7fa3f2 100644
--- a/WebCore/kwq/KWQXml.mm
+++ b/WebCore/kwq/KWQXml.mm
@@ -25,37 +25,37 @@
#import <qxml.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
#import <qstring.h>
QString QXmlAttributes::value(const QString &) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
int QXmlAttributes::length() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
QString QXmlAttributes::localName(int index) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
QString QXmlAttributes::value(int index) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
QString QXmlAttributes::uri(int) const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
@@ -63,55 +63,55 @@ QString QXmlAttributes::uri(int) const
void QXmlInputSource::setData(const QString& data)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
void QXmlSimpleReader::setContentHandler(QXmlContentHandler *handler)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
bool QXmlSimpleReader::parse(const QXmlInputSource &input)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return FALSE;
}
void QXmlSimpleReader::setLexicalHandler(QXmlLexicalHandler *handler)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
void QXmlSimpleReader::setDTDHandler(QXmlDTDHandler *handler)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
void QXmlSimpleReader::setDeclHandler(QXmlDeclHandler *handler)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
void QXmlSimpleReader::setErrorHandler(QXmlErrorHandler *handler)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
QString QXmlParseException::message() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return QString();
}
int QXmlParseException::columnNumber() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
int QXmlParseException::lineNumber() const
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
return 0;
}
diff --git a/WebCore/kwq/KWQbrowserinterface.mm b/WebCore/kwq/KWQbrowserinterface.mm
index 5085bcc..91c5276 100644
--- a/WebCore/kwq/KWQbrowserinterface.mm
+++ b/WebCore/kwq/KWQbrowserinterface.mm
@@ -25,13 +25,13 @@
#import <browserinterface.h>
-#import <kwqdebug.h>
+#import <KWQLogging.h>
namespace KParts {
void BrowserInterface::callMethod(const char *name, const QVariant &argument)
{
- _logNotYetImplemented();
+ LOG(NotYetImplemented, "not yet implemented");
}
} // namespace KParts
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 8266636..91bb230 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -32,7 +32,7 @@
#import <render_object.h>
#import <render_root.h>
#import <render_frames.h>
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
#import <html/html_documentimpl.h>
#import <xml/dom_nodeimpl.h>
#import <htmlattrs.h>
@@ -314,7 +314,7 @@ using khtml::RenderPart;
// If this isn't the main frame, it must have a render part set, or it
// won't ever get installed in the view hierarchy.
- KWQ_ASSERT(self == [self mainFrame] || renderPart != nil);
+ ASSERT(self == [self mainFrame] || renderPart != nil);
if (renderPart) {
renderPart->setWidget(part->impl->view());
diff --git a/WebCore/kwq/WebCoreCookieAdapter.m b/WebCore/kwq/WebCoreCookieAdapter.m
index efd388c..9e9efe2 100644
--- a/WebCore/kwq/WebCoreCookieAdapter.m
+++ b/WebCore/kwq/WebCoreCookieAdapter.m
@@ -24,7 +24,7 @@
*/
#import "WebCoreCookieAdapter.h"
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
@implementation WebCoreCookieAdapter
@@ -39,7 +39,7 @@ static WebCoreCookieAdapter *sharedAdapter;
{
[super init];
- KWQ_ASSERT(!sharedAdapter);
+ ASSERT(!sharedAdapter);
sharedAdapter = [self retain];
return self;
diff --git a/WebCore/kwq/WebCoreHistory.m b/WebCore/kwq/WebCoreHistory.m
index 5c967eb..b050457 100644
--- a/WebCore/kwq/WebCoreHistory.m
+++ b/WebCore/kwq/WebCoreHistory.m
@@ -27,8 +27,6 @@
#import <WebCoreHistory.h>
-#import <kwqdebug.h>
-
@implementation WebCoreHistory
static WebCoreHistory *_sharedHistory = nil;
diff --git a/WebCore/kwq/WebCoreImageRendererFactory.m b/WebCore/kwq/WebCoreImageRendererFactory.m
index 4764066..620e5a7 100644
--- a/WebCore/kwq/WebCoreImageRendererFactory.m
+++ b/WebCore/kwq/WebCoreImageRendererFactory.m
@@ -24,7 +24,7 @@
*/
#import "WebCoreImageRendererFactory.h"
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
@implementation WebCoreImageRendererFactory
@@ -39,7 +39,7 @@ static WebCoreImageRendererFactory *sharedFactory;
{
[super init];
- KWQ_ASSERT(!sharedFactory);
+ ASSERT(!sharedFactory);
sharedFactory = [self retain];
return self;
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.m b/WebCore/kwq/WebCoreTextRendererFactory.m
index 6235f38..afcc664 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.m
+++ b/WebCore/kwq/WebCoreTextRendererFactory.m
@@ -24,7 +24,7 @@
*/
#import "WebCoreTextRendererFactory.h"
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
@implementation WebCoreTextRendererFactory
@@ -40,7 +40,7 @@ static WebCoreTextRendererFactory *sharedFactory;
{
[super init];
- KWQ_ASSERT(!sharedFactory);
+ ASSERT(!sharedFactory);
sharedFactory = [self retain];
return self;
diff --git a/WebCore/kwq/WebCoreTextRendererFactory.mm b/WebCore/kwq/WebCoreTextRendererFactory.mm
index 6235f38..afcc664 100644
--- a/WebCore/kwq/WebCoreTextRendererFactory.mm
+++ b/WebCore/kwq/WebCoreTextRendererFactory.mm
@@ -24,7 +24,7 @@
*/
#import "WebCoreTextRendererFactory.h"
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
@implementation WebCoreTextRendererFactory
@@ -40,7 +40,7 @@ static WebCoreTextRendererFactory *sharedFactory;
{
[super init];
- KWQ_ASSERT(!sharedFactory);
+ ASSERT(!sharedFactory);
sharedFactory = [self retain];
return self;
diff --git a/WebCore/kwq/WebCoreViewFactory.m b/WebCore/kwq/WebCoreViewFactory.m
index 63e6e9c..a34953a 100644
--- a/WebCore/kwq/WebCoreViewFactory.m
+++ b/WebCore/kwq/WebCoreViewFactory.m
@@ -24,7 +24,7 @@
*/
#import "WebCoreViewFactory.h"
-#import <kwqdebug.h>
+#import <KWQAssertions.h>
@implementation WebCoreViewFactory
@@ -39,7 +39,7 @@ static WebCoreViewFactory *sharedFactory;
{
[super init];
- KWQ_ASSERT(!sharedFactory);
+ ASSERT(!sharedFactory);
sharedFactory = [self retain];
return self;
diff --git a/WebCore/kwq/kwqdebug.h b/WebCore/kwq/kwqdebug.h
deleted file mode 100644
index 14534c0..0000000
--- a/WebCore/kwq/kwqdebug.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KWQDEBUG_H_
-#define KWQDEBUG_H_
-
-#import <Foundation/Foundation.h>
-
-#ifdef NDEBUG
-
-#define KWQDEBUGLEVEL(level,format...) ((void)0)
-
-#define KWQ_ASSERT(expr) ((void)0)
-#define KWQ_ASSERT_VALID_ARG(arg,expr) ((void)0)
-#define KWQ_ASSERT_NOT_NIL(arg) ((void)0)
-
-#else /* NDEBUG */
-
-/*
-*/
-#define _KWQ_TIMING 1
-long _GetMillisecondsSinceEpoch();
-
-/*-----------------------------------------------------------------------------
- * Logging macros
- */
-
-#define KWQ_LOG_NEVER_IMPLEMENTED 0x00000001
-#define KWQ_LOG_PARTIALLY_IMPLEMENTED 0x00000002
-#define KWQ_LOG_NOT_YET_IMPLEMENTED 0x00000004
-#define KWQ_LOG_DEBUG 0x00000008
-#define KWQ_LOG_ERROR 0x00000010
-#define KWQ_LOG_TIMING 0x00000020
-#define KWQ_LOG_LOADING 0x00000040
-#define KWQ_LOG_MEMUSAGE 0x00000080
-#define KWQ_LOG_FONTCACHE 0x00000100
-#define KWQ_LOG_FONTCACHECHARMISS 0x00000200
-#define KWQ_LOG_FRAMES 0x00000400
-#define KWQ_LOG_DOWNLOAD 0x00000800
-#define KWQ_LOG_PLUGINS 0x00002000
-
-#define KWQ_LOG_NONE 0
-
-// bits in high byte are reserved for clients
-#define KWQ_LOG_ALL_EXCEPT_CLIENTS 0x0000FFFF
-#define KWQ_LOG_ALL 0xFFFFFFFF
-
-void KWQSetLogLevel(int mask);
-unsigned int KWQGetLogLevel();
-void KWQLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...) __attribute__((__format__ (__printf__, 5, 6)));
-
-#define DEBUG_OBJECT(object) [[object description] lossyCString]
-
-#define KWQDEBUGLEVEL(level,format...) \
- KWQLog(level, __FILE__, __LINE__, __PRETTY_FUNCTION__, format);
-
-/*-----------------------------------------------------------------------------
- * Assertion macros
- */
-
-#import <signal.h>
-#import <sys/types.h>
-#import <sys/time.h>
-#import <sys/resource.h>
-
-#define KWQ_ASSERTION_FAILURE(str_expr) \
- do { \
- struct rlimit _rlimit = {RLIM_INFINITY, RLIM_INFINITY}; \
- setrlimit(RLIMIT_CORE, &_rlimit); \
- fprintf(stderr, "=================\nASSERTION FAILED: %s (%s:%d %s)\n=================\n", str_expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
- raise(SIGQUIT); \
- } while (0)
-
-#define KWQ_ASSERT(expr) \
- do { \
- if (!(expr)) { \
- KWQ_ASSERTION_FAILURE(#expr); \
- } \
- } while (0)
-
-#define KWQ_ASSERT_VALID_ARG(arg, expr) \
- do { \
- if (!(expr)) { \
- KWQ_ASSERTION_FAILURE("bad arg " #arg " (" #expr ")"); \
- } \
- } while (0)
-
-#define KWQ_ASSERT_NOT_NIL(arg) \
- do { \
- if ((arg) == nil) { \
- KWQ_ASSERTION_FAILURE("bad arg " #arg " (" #arg " not nil )"); \
- } \
- } while (0)
-
-#endif
-
-#define KWQDEBUG(format...) KWQDEBUGLEVEL(KWQ_LOG_DEBUG,format)
-
-#define _logNeverImplemented() \
- KWQDEBUGLEVEL(KWQ_LOG_NEVER_IMPLEMENTED, "ERROR (NOT IMPLEMENTED)")
-
-#define _logPartiallyImplemented() \
- KWQDEBUGLEVEL(KWQ_LOG_PARTIALLY_IMPLEMENTED, "WARNING (PARTIALLY IMPLEMENTED)")
-
-#define _logNotYetImplemented() \
- KWQDEBUGLEVEL (KWQ_LOG_NOT_YET_IMPLEMENTED, "WARNING (NOT YET IMPLEMENTED)")
-
-#endif /* KWQDEBUG_H_ */
diff --git a/WebCore/kwq/kwqdebug.mm b/WebCore/kwq/kwqdebug.mm
deleted file mode 100644
index a26f145..0000000
--- a/WebCore/kwq/kwqdebug.mm
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <kwqdebug.h>
-
-#ifndef NDEBUG
-
-static unsigned int KWQ_LOG_LEVEL = 0;
-
-void KWQSetLogLevel(int mask) {
- KWQ_LOG_LEVEL = mask;
-}
-
-static bool kwq_checkedDefault = 0;
-
-unsigned int KWQGetLogLevel(){
- if (!kwq_checkedDefault){
- NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitLogLevel"];
- if (logLevelString != nil){
- NSScanner *scanner = [[NSScanner alloc] initWithString:logLevelString];
-
- if (![scanner scanHexInt: &KWQ_LOG_LEVEL]){
- NSLog (@"Unable to scan hex value for WebKitLogLevel, default to value of %d", KWQ_LOG_LEVEL);
- }
- [scanner release];
- }
- kwq_checkedDefault = 1;
- }
- return KWQ_LOG_LEVEL;
-}
-
-#ifdef NEED_TIMESTAMP
-static const char *
-timestamp(void)
-{
- NSString *date = [[NSDate date] descriptionWithCalendarFormat:@"%b %d %H:%M:%S.%F"
- timeZone:[NSTimeZone systemTimeZone]
- locale:nil];
- return [date cString];
-}
-#endif
-
-void KWQLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
-{
- if (KWQGetLogLevel() & level) {
- va_list args;
- fprintf(stderr, "[WEBCORE] - %s:%d %s - ", file, line, function);
- va_start(args, format);
- vfprintf(stderr, format, args);
- va_end(args);
- if (format[strlen(format) - 1] != '\n')
- putc('\n', stderr);
- }
-}
-
-#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list