diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-10-07 16:13:19 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-10-09 06:50:04 (GMT) |
commit | 7b4c917811f48328502ae4cd2a676a6f2d4f7a6b (patch) | |
tree | c95a71824901fd5bacbb5d72f80ee1fa67345264 | |
parent | 8fa32c467549d346024f4bd6b4518c7012a5cf55 (diff) | |
download | Qt-7b4c917811f48328502ae4cd2a676a6f2d4f7a6b.zip Qt-7b4c917811f48328502ae4cd2a676a6f2d4f7a6b.tar.gz Qt-7b4c917811f48328502ae4cd2a676a6f2d4f7a6b.tar.bz2 |
Added ObjectDump annotator which prints Symbian-specific internal widget flags
Reviewed-by: Frans Englich
-rw-r--r-- | src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp | 30 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp index 5ae10f9..8557e90 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp @@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <coecntrl.h> #include "objectdump_symbian.h" +#include <QtGui/private/qwidget_p.h> // to access QWExtra + QT_BEGIN_NAMESPACE namespace ObjectDump @@ -28,6 +30,32 @@ namespace ObjectDump namespace Symbian { +QList<QByteArray> QAnnotatorWidget::annotation(const QObject& object) +{ + QList<QByteArray> result; + + const QWidget* widget = qobject_cast<const QWidget*>(&object); + if(widget) { + + const QWExtra* extra = qt_widget_private(const_cast<QWidget *>(widget))->extraData(); + + if(extra) { + + QByteArray array; + QTextStream stream(&array); + + stream << "widget (Symbian): "; + stream << "activated " << extra->activated << ' '; + stream << "disableBlit " << extra->disableBlit << ' '; + + stream.flush(); + result.append(array); + } + } + + return result; +} + QList<QByteArray> QAnnotatorControl::annotation(const QObject& object) { QList<QByteArray> result; @@ -121,12 +149,14 @@ QList<QByteArray> QAnnotatorWindow::annotation(const QObject& object) void addDefaultAnnotators_sys(QDumper& dumper) { + dumper.addAnnotator(new Symbian::QAnnotatorWidget); dumper.addAnnotator(new Symbian::QAnnotatorControl); dumper.addAnnotator(new Symbian::QAnnotatorWindow); } void addDefaultAnnotators_sys(QVisitor& visitor) { + visitor.addAnnotator(new Symbian::QAnnotatorWidget); visitor.addAnnotator(new Symbian::QAnnotatorControl); visitor.addAnnotator(new Symbian::QAnnotatorWindow); } diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h index 26ab308..563c862 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h +++ b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h @@ -29,6 +29,16 @@ namespace Symbian { /** + * Annotator which returns Symbian-specific widget information + */ +class QAnnotatorWidget : public QAnnotator +{ + Q_OBJECT +public: + QList<QByteArray> annotation(const QObject& object); +}; + +/** * Annotator which returns control information */ class QAnnotatorControl : public QAnnotator |