summaryrefslogtreecommitdiffstats
path: root/tdehtml
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-07 13:45:40 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-07 13:45:40 -0500
commitecaf622512756000f3abf9687a0f3bfbadd8c75d (patch)
treeb19f895b4974d25e7e0700d268fa5ea698a35989 /tdehtml
parent8f812a828ad13f3bee89085af17628016456504e (diff)
downloadtdelibs-ecaf622512756000f3abf9687a0f3bfbadd8c75d.tar.gz
tdelibs-ecaf622512756000f3abf9687a0f3bfbadd8c75d.zip
Fix slot warnings when no partManager is available
This resolves the remainder of Bug 1088
Diffstat (limited to 'tdehtml')
-rw-r--r--tdehtml/ecma/kjs_dom.cpp18
-rw-r--r--tdehtml/tdehtml_part.cpp24
-rw-r--r--tdehtml/xml/dom_elementimpl.h6
3 files changed, 30 insertions, 18 deletions
diff --git a/tdehtml/ecma/kjs_dom.cpp b/tdehtml/ecma/kjs_dom.cpp
index 77d4983da..c76f867a4 100644
--- a/tdehtml/ecma/kjs_dom.cpp
+++ b/tdehtml/ecma/kjs_dom.cpp
@@ -609,17 +609,23 @@ Value DOMNodeProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &ar
DOMString where = args[0].toString(exec).string();
- if (where == "beforeBegin" || where == "BeforeBegin")
+ if (where == "beforeBegin" || where == "BeforeBegin") {
node.parentNode().insertBefore(docFrag, node);
- else if (where == "afterBegin" || where == "AfterBegin")
+ }
+ else if (where == "afterBegin" || where == "AfterBegin") {
node.insertBefore(docFrag, node.firstChild());
- else if (where == "beforeEnd" || where == "BeforeEnd")
+ }
+ else if (where == "beforeEnd" || where == "BeforeEnd") {
return getDOMNode(exec, node.appendChild(docFrag));
- else if (where == "afterEnd" || where == "AfterEnd")
- if (!node.nextSibling().isNull())
+ }
+ else if (where == "afterEnd" || where == "AfterEnd") {
+ if (!node.nextSibling().isNull()) {
node.parentNode().insertBefore(docFrag, node.nextSibling());
- else
+ }
+ else {
node.parentNode().appendChild(docFrag);
+ }
+ }
return Undefined();
}
diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp
index 28b15c7d1..b0a075e99 100644
--- a/tdehtml/tdehtml_part.cpp
+++ b/tdehtml/tdehtml_part.cpp
@@ -1429,8 +1429,10 @@ void TDEHTMLPart::clear()
d->m_decoder = 0;
// We don't want to change between parts if we are going to delete all of them anyway
- disconnect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ if (partManager()) {
+ disconnect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
+ }
if (d->m_frames.count())
{
@@ -1462,8 +1464,10 @@ void TDEHTMLPart::clear()
}
// Listen to part changes again
- connect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
+ if (partManager()) {
+ connect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
+ }
d->m_delayRedirect = 0;
d->m_redirectURL = TQString();
@@ -5593,14 +5597,16 @@ void TDEHTMLPart::restoreState( TQDataStream &stream )
if ( (*childFrame)->m_part )
{
- if ( (*childFrame)->m_extension )
- if ( (*childFrame)->m_extension && !(*fBufferIt).isEmpty() )
- {
- TQDataStream frameStream( *fBufferIt, IO_ReadOnly );
- (*childFrame)->m_extension->restoreState( frameStream );
+ if ( (*childFrame)->m_extension ) {
+ if ( (*childFrame)->m_extension && !(*fBufferIt).isEmpty() )
+ {
+ TQDataStream frameStream( *fBufferIt, IO_ReadOnly );
+ (*childFrame)->m_extension->restoreState( frameStream );
+ }
+ else {
+ (*childFrame)->m_part->openURL( *fURLIt );
+ }
}
- else
- (*childFrame)->m_part->openURL( *fURLIt );
}
}
diff --git a/tdehtml/xml/dom_elementimpl.h b/tdehtml/xml/dom_elementimpl.h
index e528d7e24..306c4f30b 100644
--- a/tdehtml/xml/dom_elementimpl.h
+++ b/tdehtml/xml/dom_elementimpl.h
@@ -357,11 +357,11 @@ inline bool checkQualifiedName(const DOMString &qualifiedName, const DOMString &
}
}
- if (!qualifiedName.isNull() && Element::tdehtmlMalformedQualifiedName(qualifiedName) ||
+ if (((!qualifiedName.isNull()) && Element::tdehtmlMalformedQualifiedName(qualifiedName)) ||
(colonpos >= 0 && namespaceURI.isNull()) ||
(qualifiedName.isNull() && !namespaceURI.isNull()) ||
- (colonpos == 3 && qualifiedName[0] == 'x' && qualifiedName[1] == 'm' && qualifiedName[2] == 'l' &&
- namespaceURI != "http://www.w3.org/XML/1998/namespace")) {
+ ((colonpos == 3) && (qualifiedName[0] == 'x') && (qualifiedName[1] == 'm') && (qualifiedName[2] == 'l') &&
+ (namespaceURI != "http://www.w3.org/XML/1998/namespace"))) {
if (pExceptioncode)
*pExceptioncode = DOMException::NAMESPACE_ERR;
return false;