[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:38:57 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1c1e782db8f64e2a4bea76476f36d121460ae4d9
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 13 21:32:22 2002 +0000
Fix assertion that happens on any page that has a non-HTML frame.
We were sending signals for objects in m_objects that are only supposed
to be sent for frames in m_frames. The fix is to use actual slot/signal
connections instead of our hard-coded logic.
* kwq/KWQKHTMLPartImpl.h: Add signals for started and completed.
* kwq/KWQKHTMLPartImpl.mm:
(KHTMLPart::completed): Emit completed signal.
(KHTMLPart::started): Emit started signal.
(KWQKHTMLPartImpl::KWQKHTMLPartImpl): Create signals.
* kwq/KWQObject.mm:
(QObject::connect): Write out an error message if we see any signal connections
to signals that aren't implemented, with a hardwired exception list for ones we
either aren't ever going to do or just haven't gotten around to yet.
* kwq/KWQSignal.h: Add support for signals that take bool and KIO::Job *.
* kwq/KWQSignal.mm:
(KWQSignal::connect): Put in an actual ERROR call for the case where this fails.
(KWQSignal::disconnect): Put in an actual ERROR call for the case where it fails.
(KWQSignal::call): Add overloads for bool and KIO::Job *.
* kwq/KWQSlot.h: Add support for slots that take bool and KIO::Job *.
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Add four new members.
(KWQSlot::call): Add overloads for bool and KIO::Job * and support for the new
members.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 57239f3..e764ef5 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,34 @@
+2002-09-13 Darin Adler <darin at apple.com>
+
+ Fix assertion that happens on any page that has a non-HTML frame.
+
+ We were sending signals for objects in m_objects that are only supposed
+ to be sent for frames in m_frames. The fix is to use actual slot/signal
+ connections instead of our hard-coded logic.
+
+ * kwq/KWQKHTMLPartImpl.h: Add signals for started and completed.
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KHTMLPart::completed): Emit completed signal.
+ (KHTMLPart::started): Emit started signal.
+ (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Create signals.
+
+ * kwq/KWQObject.mm:
+ (QObject::connect): Write out an error message if we see any signal connections
+ to signals that aren't implemented, with a hardwired exception list for ones we
+ either aren't ever going to do or just haven't gotten around to yet.
+
+ * kwq/KWQSignal.h: Add support for signals that take bool and KIO::Job *.
+ * kwq/KWQSignal.mm:
+ (KWQSignal::connect): Put in an actual ERROR call for the case where this fails.
+ (KWQSignal::disconnect): Put in an actual ERROR call for the case where it fails.
+ (KWQSignal::call): Add overloads for bool and KIO::Job *.
+
+ * kwq/KWQSlot.h: Add support for slots that take bool and KIO::Job *.
+ * kwq/KWQSlot.mm:
+ (KWQSlot::KWQSlot): Add four new members.
+ (KWQSlot::call): Add overloads for bool and KIO::Job * and support for the new
+ members.
+
2002-09-12 Darin Adler <darin at apple.com>
* kwq/KWQAssertions.h: Update assertions from from the copy in WebFoundation.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 57239f3..e764ef5 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,34 @@
+2002-09-13 Darin Adler <darin at apple.com>
+
+ Fix assertion that happens on any page that has a non-HTML frame.
+
+ We were sending signals for objects in m_objects that are only supposed
+ to be sent for frames in m_frames. The fix is to use actual slot/signal
+ connections instead of our hard-coded logic.
+
+ * kwq/KWQKHTMLPartImpl.h: Add signals for started and completed.
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KHTMLPart::completed): Emit completed signal.
+ (KHTMLPart::started): Emit started signal.
+ (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Create signals.
+
+ * kwq/KWQObject.mm:
+ (QObject::connect): Write out an error message if we see any signal connections
+ to signals that aren't implemented, with a hardwired exception list for ones we
+ either aren't ever going to do or just haven't gotten around to yet.
+
+ * kwq/KWQSignal.h: Add support for signals that take bool and KIO::Job *.
+ * kwq/KWQSignal.mm:
+ (KWQSignal::connect): Put in an actual ERROR call for the case where this fails.
+ (KWQSignal::disconnect): Put in an actual ERROR call for the case where it fails.
+ (KWQSignal::call): Add overloads for bool and KIO::Job *.
+
+ * kwq/KWQSlot.h: Add support for slots that take bool and KIO::Job *.
+ * kwq/KWQSlot.mm:
+ (KWQSlot::KWQSlot): Add four new members.
+ (KWQSlot::call): Add overloads for bool and KIO::Job * and support for the new
+ members.
+
2002-09-12 Darin Adler <darin at apple.com>
* kwq/KWQAssertions.h: Update assertions from from the copy in WebFoundation.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 57239f3..e764ef5 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,34 @@
+2002-09-13 Darin Adler <darin at apple.com>
+
+ Fix assertion that happens on any page that has a non-HTML frame.
+
+ We were sending signals for objects in m_objects that are only supposed
+ to be sent for frames in m_frames. The fix is to use actual slot/signal
+ connections instead of our hard-coded logic.
+
+ * kwq/KWQKHTMLPartImpl.h: Add signals for started and completed.
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KHTMLPart::completed): Emit completed signal.
+ (KHTMLPart::started): Emit started signal.
+ (KWQKHTMLPartImpl::KWQKHTMLPartImpl): Create signals.
+
+ * kwq/KWQObject.mm:
+ (QObject::connect): Write out an error message if we see any signal connections
+ to signals that aren't implemented, with a hardwired exception list for ones we
+ either aren't ever going to do or just haven't gotten around to yet.
+
+ * kwq/KWQSignal.h: Add support for signals that take bool and KIO::Job *.
+ * kwq/KWQSignal.mm:
+ (KWQSignal::connect): Put in an actual ERROR call for the case where this fails.
+ (KWQSignal::disconnect): Put in an actual ERROR call for the case where it fails.
+ (KWQSignal::call): Add overloads for bool and KIO::Job *.
+
+ * kwq/KWQSlot.h: Add support for slots that take bool and KIO::Job *.
+ * kwq/KWQSlot.mm:
+ (KWQSlot::KWQSlot): Add four new members.
+ (KWQSlot::call): Add overloads for bool and KIO::Job * and support for the new
+ members.
+
2002-09-12 Darin Adler <darin at apple.com>
* kwq/KWQAssertions.h: Update assertions from from the copy in WebFoundation.
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 498cd6e..9e1db15 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -28,6 +28,7 @@
#include <qobject.h>
#include <kurl.h>
+#include <KWQSignal.h>
class KHTMLPart;
class KHTMLPartPrivate;
@@ -134,6 +135,10 @@ private:
KHTMLPartPrivate *d;
WebCoreBridge *_bridge;
+
+ KWQSignal _started;
+ KWQSignal _completed;
+ KWQSignal _completedWithBool;
static QPtrList<KWQKHTMLPartImpl> &mutableInstances();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index eef196d..58c5f1d 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -52,59 +52,45 @@ using KIO::Job;
using KParts::ReadOnlyPart;
using KParts::URLArgs;
-void KHTMLPart::onURL(const QString &)
+void KHTMLPart::completed()
{
+ impl->_completed.call();
}
-void KHTMLPart::nodeActivated(const DOM::Node &aNode)
+void KHTMLPart::completed(bool arg)
{
+ impl->_completed.call(arg);
}
-void KHTMLPart::setStatusBarText(const QString &status)
+void KHTMLPart::nodeActivated(const DOM::Node &aNode)
{
- impl->setStatusBarText(status);
}
-static void redirectionTimerMonitor(void *context)
+void KHTMLPart::onURL(const QString &)
{
- KWQKHTMLPartImpl *impl = static_cast<KWQKHTMLPartImpl *>(context);
- impl->redirectionTimerStartedOrStopped();
}
-void KHTMLPart::started(Job *j)
+void KHTMLPart::setStatusBarText(const QString &status)
{
- KWQObjectSenderScope senderScope(this);
-
- if (parentPart()) {
- parentPart()->slotChildStarted(j);
- }
+ impl->setStatusBarText(status);
}
-void KHTMLPart::completed()
+void KHTMLPart::started(Job *j)
{
- completed(false);
+ impl->_started.call(j);
}
-void KHTMLPart::completed(bool arg)
+static void redirectionTimerMonitor(void *context)
{
- KWQObjectSenderScope senderScope(this);
-
- if (parentPart()) {
- parentPart()->slotChildCompleted(arg);
- }
-
- ConstFrameIt it = d->m_frames.begin();
- ConstFrameIt end = d->m_frames.end();
- for (; it != end; ++it ) {
- KHTMLPart *part = dynamic_cast<KHTMLPart *>((*it).m_part.pointer());
- if (part) {
- part->slotParentCompleted();
- }
- }
+ KWQKHTMLPartImpl *impl = static_cast<KWQKHTMLPartImpl *>(context);
+ impl->redirectionTimerStartedOrStopped();
}
KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
: part(p), d(part->d)
+ , _started(p, SIGNAL(started(KIO::Job *)))
+ , _completed(p, SIGNAL(completed()))
+ , _completedWithBool(p, SIGNAL(completed(bool)))
{
mutableInstances().prepend(this);
d->m_redirectionTimer.setMonitor(redirectionTimerMonitor, this);
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index 498cd6e..9e1db15 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -28,6 +28,7 @@
#include <qobject.h>
#include <kurl.h>
+#include <KWQSignal.h>
class KHTMLPart;
class KHTMLPartPrivate;
@@ -134,6 +135,10 @@ private:
KHTMLPartPrivate *d;
WebCoreBridge *_bridge;
+
+ KWQSignal _started;
+ KWQSignal _completed;
+ KWQSignal _completedWithBool;
static QPtrList<KWQKHTMLPartImpl> &mutableInstances();
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index eef196d..58c5f1d 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -52,59 +52,45 @@ using KIO::Job;
using KParts::ReadOnlyPart;
using KParts::URLArgs;
-void KHTMLPart::onURL(const QString &)
+void KHTMLPart::completed()
{
+ impl->_completed.call();
}
-void KHTMLPart::nodeActivated(const DOM::Node &aNode)
+void KHTMLPart::completed(bool arg)
{
+ impl->_completed.call(arg);
}
-void KHTMLPart::setStatusBarText(const QString &status)
+void KHTMLPart::nodeActivated(const DOM::Node &aNode)
{
- impl->setStatusBarText(status);
}
-static void redirectionTimerMonitor(void *context)
+void KHTMLPart::onURL(const QString &)
{
- KWQKHTMLPartImpl *impl = static_cast<KWQKHTMLPartImpl *>(context);
- impl->redirectionTimerStartedOrStopped();
}
-void KHTMLPart::started(Job *j)
+void KHTMLPart::setStatusBarText(const QString &status)
{
- KWQObjectSenderScope senderScope(this);
-
- if (parentPart()) {
- parentPart()->slotChildStarted(j);
- }
+ impl->setStatusBarText(status);
}
-void KHTMLPart::completed()
+void KHTMLPart::started(Job *j)
{
- completed(false);
+ impl->_started.call(j);
}
-void KHTMLPart::completed(bool arg)
+static void redirectionTimerMonitor(void *context)
{
- KWQObjectSenderScope senderScope(this);
-
- if (parentPart()) {
- parentPart()->slotChildCompleted(arg);
- }
-
- ConstFrameIt it = d->m_frames.begin();
- ConstFrameIt end = d->m_frames.end();
- for (; it != end; ++it ) {
- KHTMLPart *part = dynamic_cast<KHTMLPart *>((*it).m_part.pointer());
- if (part) {
- part->slotParentCompleted();
- }
- }
+ KWQKHTMLPartImpl *impl = static_cast<KWQKHTMLPartImpl *>(context);
+ impl->redirectionTimerStartedOrStopped();
}
KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
: part(p), d(part->d)
+ , _started(p, SIGNAL(started(KIO::Job *)))
+ , _completed(p, SIGNAL(completed()))
+ , _completedWithBool(p, SIGNAL(completed(bool)))
{
mutableInstances().prepend(this);
d->m_redirectionTimer.setMonitor(redirectionTimerMonitor, this);
diff --git a/WebCore/kwq/KWQObject.mm b/WebCore/kwq/KWQObject.mm
index 635e9b3..a423efb 100644
--- a/WebCore/kwq/KWQObject.mm
+++ b/WebCore/kwq/KWQObject.mm
@@ -52,7 +52,22 @@ void QObject::connect(const QObject *sender, const char *signalName, const QObje
KWQSignal *signal = sender->findSignal(signalName);
if (!signal) {
- // FIXME: ERROR
+#if !ERROR_DISABLED
+ if (1
+ && !KWQNamesMatch(member, SLOT(parentDestroyed()))
+ && !KWQNamesMatch(member, SLOT(slotData(KIO::Job *, const QByteArray &)))
+ && !KWQNamesMatch(member, SLOT(slotFinished(KIO::Job *)))
+ && !KWQNamesMatch(member, SLOT(slotHistoryChanged()))
+ && !KWQNamesMatch(member, SLOT(slotJobPercent(KIO::Job *, unsigned long)))
+ && !KWQNamesMatch(member, SLOT(slotJobSpeed(KIO::Job *, unsigned long)))
+ && !KWQNamesMatch(member, SLOT(slotLoaderRequestDone(khtml::DocLoader *, khtml::CachedObject *)))
+ && !KWQNamesMatch(member, SLOT(slotLoaderRequestStarted(khtml::DocLoader *, khtml::CachedObject *)))
+ && !KWQNamesMatch(member, SLOT(slotRedirection(KIO::Job *, const KURL &)))
+ && !KWQNamesMatch(member, SLOT(slotScrollBarMoved()))
+ && !KWQNamesMatch(member, SLOT(slotWidgetDestructed()))
+ )
+ ERROR("connecting member %s to signal %s, but that signal was not found", member, signalName);
+#endif
return;
}
signal->connect(KWQSlot(const_cast<QObject *>(receiver), member));
diff --git a/WebCore/kwq/KWQSignal.h b/WebCore/kwq/KWQSignal.h
index 0943095..e6a217a 100644
--- a/WebCore/kwq/KWQSignal.h
+++ b/WebCore/kwq/KWQSignal.h
@@ -37,8 +37,10 @@ public:
void disconnect(const KWQSlot &);
void call() const; // should be "emit"; can't be due to define in qobject.h
+ void call(bool) const;
void call(int) const;
void call(const QString &) const;
+ void call(KIO::Job *) const;
private:
// forbid copying and assignment
diff --git a/WebCore/kwq/KWQSignal.mm b/WebCore/kwq/KWQSignal.mm
index 9babbfb..c31a723 100644
--- a/WebCore/kwq/KWQSignal.mm
+++ b/WebCore/kwq/KWQSignal.mm
@@ -26,6 +26,9 @@
#import "KWQSignal.h"
#import "qobject.h"
+#import "KWQAssertions.h"
+
+using KIO::Job;
KWQSignal::KWQSignal(QObject *object, const char *name)
: m_object(object), m_next(object->m_signalListHead), m_name(name)
@@ -49,7 +52,7 @@ KWQSignal::~KWQSignal()
void KWQSignal::connect(const KWQSlot &slot)
{
if (!m_slot.isEmpty()) {
- // ERROR
+ ERROR("multiple connects to the same signal are not supported");
return;
}
m_slot = slot;
@@ -58,7 +61,7 @@ void KWQSignal::connect(const KWQSlot &slot)
void KWQSignal::disconnect(const KWQSlot &slot)
{
if (m_slot != slot) {
- // ERROR
+ ERROR("disconnecting a signal that wasn't connected");
return;
}
m_slot.clear();
@@ -72,6 +75,14 @@ void KWQSignal::call() const
}
}
+void KWQSignal::call(bool b) const
+{
+ if (!m_object->m_signalsBlocked) {
+ KWQObjectSenderScope senderScope(m_object);
+ m_slot.call(b);
+ }
+}
+
void KWQSignal::call(int i) const
{
if (!m_object->m_signalsBlocked) {
@@ -87,3 +98,11 @@ void KWQSignal::call(const QString &s) const
m_slot.call(s);
}
}
+
+void KWQSignal::call(Job *j) const
+{
+ if (!m_object->m_signalsBlocked) {
+ KWQObjectSenderScope senderScope(m_object);
+ m_slot.call(j);
+ }
+}
diff --git a/WebCore/kwq/KWQSlot.h b/WebCore/kwq/KWQSlot.h
index 9295f7b..7669408 100644
--- a/WebCore/kwq/KWQSlot.h
+++ b/WebCore/kwq/KWQSlot.h
@@ -28,6 +28,10 @@
#import <qguardedptr.h>
+namespace KIO {
+ class Job;
+}
+
// Like strcmp, but ignores spaces.
bool KWQNamesMatch(const char *a, const char *b);
@@ -40,8 +44,10 @@ public:
void clear() { m_object = 0; }
void call() const;
+ void call(bool) const;
void call(int) const;
void call(const QString &) const;
+ void call(KIO::Job *) const;
friend bool operator==(const KWQSlot &, const KWQSlot &);
diff --git a/WebCore/kwq/KWQSlot.mm b/WebCore/kwq/KWQSlot.mm
index b5bf1b5..fd91765 100644
--- a/WebCore/kwq/KWQSlot.mm
+++ b/WebCore/kwq/KWQSlot.mm
@@ -38,12 +38,17 @@ using khtml::RenderFormElement;
using khtml::RenderLineEdit;
using khtml::RenderSelect;
using khtml::RenderTextArea;
+using KIO::Job;
enum FunctionNumber {
signalFinishedParsing,
slotAutoScroll,
+ slotChildCompleted,
+ slotChildCompletedWithBool,
+ slotChildStarted,
slotClicked,
slotFinishedParsing,
+ slotParentCompleted,
slotRedirect,
slotReturnPressed,
slotSelected,
@@ -64,9 +69,21 @@ KWQSlot::KWQSlot(QObject *object, const char *member) : m_object(0)
} else if (KWQNamesMatch(member, SLOT(slotClicked()))) {
ASSERT(dynamic_cast<RenderFormElement *>(object));
m_function = slotClicked;
+ } else if (KWQNamesMatch(member, SLOT(slotChildCompleted()))) {
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
+ m_function = slotChildCompleted;
+ } else if (KWQNamesMatch(member, SLOT(slotChildCompleted(bool)))) {
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
+ m_function = slotChildCompletedWithBool;
+ } else if (KWQNamesMatch(member, SLOT(slotChildStarted(KIO::Job *)))) {
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
+ m_function = slotChildStarted;
} else if (KWQNamesMatch(member, SLOT(slotFinishedParsing()))) {
ASSERT(dynamic_cast<KHTMLPart *>(object));
m_function = slotFinishedParsing;
+ } else if (KWQNamesMatch(member, SLOT(slotParentCompleted()))) {
+ ASSERT(dynamic_cast<KHTMLPart *>(object));
+ m_function = slotParentCompleted;
} else if (KWQNamesMatch(member, SLOT(slotRedirect()))) {
ASSERT(dynamic_cast<KHTMLPart *>(object));
m_function = slotRedirect;
@@ -89,7 +106,7 @@ KWQSlot::KWQSlot(QObject *object, const char *member) : m_object(0)
ASSERT(dynamic_cast<RenderLineEdit *>(object) || dynamic_cast<RenderFileButton *>(object));
m_function = slotTextChangedWithString;
} else {
- NSLog(@"trying to create a slot for unknown member %s", member);
+ ERROR("trying to create a slot for unknown member %s", member);
return;
}
m_object = object;
@@ -101,42 +118,26 @@ void KWQSlot::call() const
return;
}
- switch (m_function) {
- case signalFinishedParsing: {
- DocumentImpl *doc = dynamic_cast<DocumentImpl *>(m_object.pointer());
- if (doc) {
- doc->m_finishedParsing.call();
- }
- return;
- }
- case slotAutoScroll: {
- KHTMLPart *part = dynamic_cast<KHTMLPart *>(m_object.pointer());
- if (part) {
- part->slotAutoScroll();
- }
- return;
- }
- case slotClicked: {
- RenderFormElement *element = dynamic_cast<RenderFormElement *>(m_object.pointer());
- if (element) {
- element->slotClicked();
- }
- return;
- }
- case slotFinishedParsing: {
- KHTMLPart *part = dynamic_cast<KHTMLPart *>(m_object.pointer());
- if (part) {
- part->slotFinishedParsing();
- }
- return;
- }
- case slotRedirect: {
- KHTMLPart *part = dynamic_cast<KHTMLPart *>(m_object.pointer());
- if (part) {
- part->slotRedirect();
- }
- return;
+ #define CASE(member, type, function) \
+ case member: { \
+ type *o = dynamic_cast<type *>(m_object.pointer()); \
+ if (o) { \
+ o->function(); \
+ } \
+ return; \
}
+
+ switch (m_function) {
+ CASE(signalFinishedParsing, DocumentImpl, m_finishedParsing.call)
+ CASE(slotAutoScroll, KHTMLPart, slotAutoScroll)
+ CASE(slotChildCompleted, KHTMLPart, slotChildCompleted)
+ CASE(slotClicked, RenderFormElement, slotClicked)
+ CASE(slotFinishedParsing, KHTMLPart, slotFinishedParsing)
+ CASE(slotParentCompleted, KHTMLPart, slotParentCompleted)
+ CASE(slotRedirect, KHTMLPart, slotRedirect)
+ CASE(slotSelectionChanged, RenderSelect, slotSelectionChanged)
+ CASE(slotTextChanged, RenderTextArea, slotTextChanged)
+
case slotReturnPressed: {
RenderLineEdit *edit = dynamic_cast<RenderLineEdit *>(m_object.pointer());
if (edit) {
@@ -148,21 +149,33 @@ void KWQSlot::call() const
}
return;
}
- case slotSelectionChanged: {
- RenderSelect *select = dynamic_cast<RenderSelect *>(m_object.pointer());
- if (select) {
- select->slotSelectionChanged();
- }
- return;
- }
- case slotTextChanged: {
- RenderTextArea *area = dynamic_cast<RenderTextArea *>(m_object.pointer());
- if (area) {
- area->slotTextChanged();
- }
- return;
+ }
+
+ #undef CASE
+}
+
+void KWQSlot::call(bool b) const
+{
+ if (!m_object) {
+ return;
+ }
+
+ #define CASE(member, type, function) \
+ case member: { \
+ type *o = dynamic_cast<type *>(m_object.pointer()); \
+ if (o) { \
+ o->function(b); \
+ } \
+ return; \
}
+
+ switch (m_function) {
+ CASE(slotChildCompletedWithBool, KHTMLPart, slotChildCompleted)
}
+
+ #undef CASE
+
+ call();
}
void KWQSlot::call(int i) const
@@ -214,6 +227,25 @@ void KWQSlot::call(const QString &string) const
call();
}
+void KWQSlot::call(Job *job) const
+{
+ if (!m_object) {
+ return;
+ }
+
+ switch (m_function) {
+ case slotChildStarted: {
+ KHTMLPart *part = dynamic_cast<KHTMLPart *>(m_object.pointer());
+ if (part) {
+ part->slotChildStarted(job);
+ }
+ return;
+ }
+ }
+
+ call();
+}
+
bool operator==(const KWQSlot &a, const KWQSlot &b)
{
return a.m_object == b.m_object && (a.m_object == 0 || a.m_function == b.m_function);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list