diff options
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractmediaplayer.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractplayer.h | 6 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp | 118 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h | 30 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp | 20 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h | 38 |
7 files changed, 108 insertions, 108 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp index 2fdb092..4c9d1a5 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp @@ -381,7 +381,7 @@ void MMF::AbstractMediaPlayer::changeState(PrivateState newState) ) { // Ensure initial volume is set on MMF API before starting playback doVolumeChanged(); - + // Check whether play() was called while clip was being loaded. If so, // playback should be started now if (m_playPending) { diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h index ec39ab1..08558cf 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.h +++ b/src/3rdparty/phonon/mmf/abstractplayer.h @@ -87,7 +87,7 @@ public: // VolumeObserver virtual void volumeChanged(qreal volume); - + void setVideoOutput(VideoOutput* videoOutput); /** @@ -146,9 +146,9 @@ private: protected: // Not owned VideoOutput* m_videoOutput; - + qreal m_volume; - + private: PrivateState m_state; Phonon::ErrorType m_error; diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index 76db5cb..29ac2df 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -112,7 +112,7 @@ MMF::MediaType MMF::MediaObject::fileMediaType MediaType result = MediaTypeUnknown; if (openRecognizer()) { - + const QHBufC fileNameSymbian(QDir::toNativeSeparators(fileName)); m_file.Close(); diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp index ef2b81c..c5d066e 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp @@ -36,7 +36,7 @@ namespace ObjectDump QAnnotator::~QAnnotator() { - + } @@ -45,53 +45,53 @@ QAnnotator::~QAnnotator() //----------------------------------------------------------------------------- QList<QByteArray> QAnnotatorBasic::annotation(const QObject& object) -{ +{ QList<QByteArray> result; - + QByteArray array; QTextStream stream(&array); - + stream << '[' << &object << ']'; stream << ' '; stream << object.metaObject()->className(); - + if(object.objectName() != "") stream << " \"" << object.objectName() << '"'; - + if(object.isWidgetType()) stream << " isWidget"; - + stream.flush(); result.append(array); return result; } QList<QByteArray> QAnnotatorWidget::annotation(const QObject& object) -{ +{ QList<QByteArray> result; - + const QWidget* widget = qobject_cast<const QWidget*>(&object); if(widget) { - + QByteArray array; QTextStream stream(&array); - + stream << "widget: "; - + if(widget->isVisible()) stream << "visible "; else stream << "invisible "; - + stream << widget->x() << ',' << widget->y() << ' '; stream << widget->size().width() << 'x'<< widget->size().height() << ' '; - + stream << "hint " << widget->sizeHint().width() << 'x' << widget->sizeHint().height(); - + stream.flush(); result.append(array); } - + return result; } @@ -105,12 +105,12 @@ class QDumperBase public: QDumperBase(); ~QDumperBase(); - + void setPrefix(const QString& prefix); void addAnnotator(QAnnotator* annotator); - + protected: - QByteArray m_prefix; + QByteArray m_prefix; QList<QAnnotator*> m_annotators; }; @@ -139,7 +139,7 @@ void QDumperBase::addAnnotator(QAnnotator* annotator) // Protect against an exception occurring during QList::append QScopedPointer<QAnnotator> holder(annotator); m_annotators.append(annotator); - holder.take(); + holder.take(); } @@ -148,13 +148,13 @@ void QDumperBase::addAnnotator(QAnnotator* annotator) //----------------------------------------------------------------------------- class QDumperPrivate : public QDumperBase -{ +{ public: QDumperPrivate(); ~QDumperPrivate(); void dumpObject(const QObject& object); - + }; @@ -206,27 +206,27 @@ void QDumper::addAnnotator(QAnnotator* annotator) } void QDumper::dumpObject(const QObject& object) -{ +{ d_func()->dumpObject(object); } - + //----------------------------------------------------------------------------- // QVisitor //----------------------------------------------------------------------------- class QVisitorPrivate : public QDumperBase -{ +{ public: QVisitorPrivate(); ~QVisitorPrivate(); - + void setIndent(unsigned indent); - + void visitNode(const QObject& object); void visitComplete(); -private: +private: class Node { public: @@ -235,24 +235,24 @@ private: QList<QByteArray> m_annotation; QList<Node*> m_children; - + typedef QList<Node*>::const_iterator child_iterator; }; - + private: Node* findNode(const QObject* object) const; QByteArray branchBuffer(const QList<bool>& branches, bool isNodeLine, bool isLastChild) const; void dumpRecursive(const Node& node, QList<bool> branches, bool isLastChild); void dumpNode(const Node& node, const QList<bool>& branches, bool isLastChild); - + private: unsigned m_indent; - + QScopedPointer<Node> m_root; - + // Hash table used to associate internal nodes with QObjects typedef QHash<const QObject*, Node*> Hash; - Hash m_hash; + Hash m_hash; }; static const unsigned DefaultIndent = 2; @@ -274,19 +274,19 @@ void QVisitorPrivate::setIndent(unsigned indent) } // Builds up a mirror of the object tree, rooted in m_root, with each node -// storing annotations generated by +// storing annotations generated by void QVisitorPrivate::visitNode(const QObject& object) -{ +{ QObject* const objectParent = object.parent(); Node* const nodeParent = objectParent ? findNode(objectParent) : 0; // Create a new node and store in scoped pointer for exception safety Node* node = new Node; QScopedPointer<Node> nodePtr(node); - + // Associate node with QObject m_hash.insert(&object, node); - + // Insert node into internal tree if(nodeParent) { @@ -297,7 +297,7 @@ void QVisitorPrivate::visitNode(const QObject& object) Q_ASSERT(m_root.isNull()); m_root.reset(nodePtr.take()); } - + // Generate and store annotations QAnnotator* annotator; foreach(annotator, m_annotators) @@ -322,13 +322,13 @@ QByteArray QVisitorPrivate::branchBuffer (const QList<bool>& branches, bool isNodeLine, bool isLastChild) const { const int depth = branches.count(); - + const QByteArray indent(m_indent, ' '); const QByteArray horiz(m_indent, '-'); QByteArray buffer; QTextStream stream(&buffer); - + for (int i=0; i<depth-1; ++i) { if(branches[i]) stream << '|'; @@ -336,7 +336,7 @@ QByteArray QVisitorPrivate::branchBuffer stream << ' '; stream << indent; } - + if(depth) { if(isNodeLine) stream << '+' << horiz; @@ -348,44 +348,44 @@ QByteArray QVisitorPrivate::branchBuffer stream << indent; } } - + stream.flush(); buffer.push_front(m_prefix); - + return buffer; } void QVisitorPrivate::dumpRecursive (const Node& node, QList<bool> branches, bool isLastChild) -{ +{ dumpNode(node, branches, isLastChild); - + // Recurse down tree const Node::child_iterator begin = node.m_children.begin(); const Node::child_iterator end = node.m_children.end(); for(Node::child_iterator i = begin; end != i; ++i) { - + isLastChild = (end == i + 1); - + if(begin == i) branches.push_back(!isLastChild); else branches.back() = !isLastChild; - + static const bool isNodeLine = false; const QByteArray buffer = branchBuffer(branches, isNodeLine, false); qDebug() << buffer.constData(); - + dumpRecursive(**i, branches, isLastChild); } } void QVisitorPrivate::dumpNode (const Node& node, const QList<bool>& branches, bool isLastChild) -{ +{ const QList<QByteArray>::const_iterator begin = node.m_annotation.begin(), end = node.m_annotation.end(); - + if(begin == end) { // No annotations - just dump the object pointer const bool isNodeLine = true; @@ -408,7 +408,7 @@ void QVisitorPrivate::dumpNode QVisitorPrivate::Node::Node() { - + } QVisitorPrivate::Node::~Node() @@ -453,7 +453,7 @@ void QVisitor::visitPrepare() } void QVisitor::visitNode(const QObject& object) -{ +{ d_func()->visitNode(object); } @@ -474,7 +474,7 @@ void addDefaultAnnotators(QDumper& dumper) { dumper.addAnnotator(new QAnnotatorBasic); dumper.addAnnotator(new QAnnotatorWidget); - + // Add platform-specific annotators addDefaultAnnotators_sys(dumper); } @@ -483,7 +483,7 @@ void addDefaultAnnotators(QVisitor& visitor) { visitor.addAnnotator(new QAnnotatorBasic); visitor.addAnnotator(new QAnnotatorWidget); - + // Add platform-specific annotators addDefaultAnnotators_sys(visitor); } @@ -492,7 +492,7 @@ void dumpTreeFromRoot(const QObject& root, QVisitor& visitor) { // Set up iteration range ObjectTree::DepthFirstConstIterator begin(root), end; - + // Invoke generic visitor algorithm ObjectTree::visit(begin, end, visitor); } @@ -505,7 +505,7 @@ void dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor) { root = root->parent(); } - + dumpTreeFromRoot(*root, visitor); } @@ -513,7 +513,7 @@ void dumpAncestors(const QObject& leaf, QVisitor& visitor) { // Set up iteration range ObjectTree::AncestorConstIterator begin(leaf), end; - + // Invoke generic visitor algorithm ObjectTree::visit(begin, end, visitor); } diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h index cbd9bea..e94b3ac 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h @@ -32,7 +32,7 @@ namespace ObjectDump { /** - * Abstract base for annotator classes invoked by QVisitor. + * Abstract base for annotator classes invoked by QVisitor. */ class OBJECTDUMP_EXPORT QAnnotator : public QObject { @@ -72,29 +72,29 @@ class OBJECTDUMP_EXPORT QDumper : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDumper) - + public: QDumper(); ~QDumper(); - + /** * Specify a prefix, to be printed on each line of output. */ void setPrefix(const QString& prefix); - + /** * Takes ownership of annotator. */ void addAnnotator(QAnnotator* annotator); - + /** * Invoke each annotator on the object and write to debug output. */ void dumpObject(const QObject& object); - + private: QScopedPointer<QDumperPrivate> d_ptr; - + }; @@ -107,36 +107,36 @@ class OBJECTDUMP_EXPORT QVisitor : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QVisitor) - + public: QVisitor(); ~QVisitor(); - + /** * Specify a prefix, to be printed on each line of output. */ void setPrefix(const QString& prefix); - + /** * Set number of spaces by which each level of the tree is indented. */ void setIndent(unsigned indent); - + /** * Called by the visitor algorithm before starting the visit. */ void visitPrepare(); - + /** * Called by the visitor algorithm as each node is visited. */ void visitNode(const QObject& object); - + /** * Called by the visitor algorithm when the visit is complete. */ void visitComplete(); - + /** * Takes ownership of annotator. */ @@ -144,7 +144,7 @@ public: private: QScopedPointer<QVisitorPrivate> d_ptr; - + }; diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp index 5053b2d..bc61435 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp @@ -28,38 +28,38 @@ namespace ObjectTree DepthFirstConstIterator::DepthFirstConstIterator() : m_pointee(0) { - + } DepthFirstConstIterator::DepthFirstConstIterator (const QObject& root) : m_pointee(&root) { - + } - + DepthFirstConstIterator& DepthFirstConstIterator::operator++() { const QObjectList& children = m_pointee->children(); - + if (children.count() == 0) { backtrack(); } else { m_history.push(0); - m_pointee = children.first(); + m_pointee = children.first(); } - + return *this; } void DepthFirstConstIterator::backtrack() -{ +{ if (m_history.count()) { const int index = m_history.top(); m_history.pop(); - + const QObjectList& siblings = m_pointee->parent()->children(); if (siblings.count() > index + 1) { m_history.push(index + 1); @@ -70,7 +70,7 @@ void DepthFirstConstIterator::backtrack() backtrack(); } } - else { + else { // Reached end of search m_pointee = 0; } @@ -80,7 +80,7 @@ void DepthFirstConstIterator::backtrack() AncestorConstIterator::AncestorConstIterator() { - + } AncestorConstIterator::AncestorConstIterator(const QObject& leaf) diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h b/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h index f2729fa..6eb6076 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h @@ -34,24 +34,24 @@ namespace ObjectTree */ class OBJECTDUMP_EXPORT DepthFirstConstIterator { -public: +public: DepthFirstConstIterator(); DepthFirstConstIterator(const QObject& root); - + DepthFirstConstIterator& operator++(); - + inline bool operator==(const DepthFirstConstIterator& other) const { return other.m_pointee == m_pointee; } - + inline bool operator!=(const DepthFirstConstIterator& other) const { return other.m_pointee != m_pointee; } - + inline const QObject* operator->() const { return m_pointee; } inline const QObject& operator*() const { return *m_pointee; } - + private: void backtrack(); - + private: const QObject* m_pointee; QStack<int> m_history; @@ -62,40 +62,40 @@ private: */ class OBJECTDUMP_EXPORT AncestorConstIterator { -public: +public: AncestorConstIterator(); AncestorConstIterator(const QObject& root); - + inline AncestorConstIterator& operator++() { m_ancestors.pop(); return *this; } - + inline bool operator==(const AncestorConstIterator& other) const { return other.m_ancestors == m_ancestors; } - + inline bool operator!=(const AncestorConstIterator& other) const { return other.m_ancestors != m_ancestors; } - + inline const QObject* operator->() const { return m_ancestors.top(); } inline const QObject& operator*() const { return *m_ancestors.top(); } - + private: QStack<const QObject*> m_ancestors; - + }; /** * Generic algorithm for visiting nodes in an object tree. Nodes in the * tree are visited in a const context, therefore they are not modified * by this algorithm. - * + * * Visitor must provide functions with the following signatures: - * + * * Called before visit begins * void visitPrepare() - * + * * Called on each node visited * void visitNode(const QObject& object) - * + * * Called when visit is complete * void visitComplete() */ @@ -103,7 +103,7 @@ template <class Iterator, class Visitor> void visit(Iterator begin, Iterator end, Visitor& visitor) { visitor.visitPrepare(); - + for( ; begin != end; ++begin) visitor.visitNode(*begin); |