[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/clients/akonadiconsole
From: Volker Krause <vkrause () kde ! org>
Date: 2008-09-13 12:24:52
Message-ID: 1221308692.898611.24627.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 860586 by vkrause:
Allow to enable/disable the server side protocol level debugging mode.
M +6 -0 CMakeLists.txt
M +18 -3 debugwidget.cpp
M +4 -0 debugwidget.h
A org.freedesktop.Akonadi.DebugInterface.xml
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/CMakeLists.txt #860585:860586
@@ -22,6 +22,12 @@
qt4_add_dbus_interfaces( akonadiconsole_bin_SRCS
${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.TracerNotification.xml
)
+# Use intalled interface once we can depend on Akoandi 1.1
+set_source_files_properties( org.freedesktop.Akonadi.DebugInterface.xml PROPERTIES \
CLASSNAME DebugInterface ) +qt4_add_dbus_interface( akonadiconsole_bin_SRCS
+ org.freedesktop.Akonadi.DebugInterface.xml
+ debuginterface
+)
kde4_add_ui_files(akonadiconsole_bin_SRCS
browserwidget_itemview.ui
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/debugwidget.cpp #860585:860586
@@ -21,20 +21,30 @@
#include "debugwidget.h"
+#include "tracernotificationinterface.h"
+#include "connectionpage.h"
+#include "debuginterface.h"
+
+#include <KLocale>
+
#include <QtGui/QPushButton>
#include <QtGui/QSplitter>
#include <QtGui/QTabWidget>
#include <QtGui/QTextEdit>
#include <QtGui/QVBoxLayout>
+#include <QtGui/QCheckBox>
-#include "tracernotificationinterface.h"
-#include "connectionpage.h"
-
DebugWidget::DebugWidget( QWidget *parent )
: QWidget( parent )
{
QVBoxLayout *layout = new QVBoxLayout( this );
+ mDebugInterface = new DebugInterface( "org.freedesktop.Akonadi", "/debug", \
QDBusConnection::sessionBus(), this ); + QCheckBox *cb = new QCheckBox( i18n("Enable \
Debugger"), this ); + cb->setChecked( mDebugInterface->tracer().value() == \
QLatin1String( "dbus" ) ); + connect( cb, SIGNAL(toggled(bool)), \
SLOT(enableDebugger(bool)) ); + layout->addWidget( cb );
+
QSplitter *splitter = new QSplitter( Qt::Vertical, this );
splitter->setObjectName( "debugSplitter" );
layout->addWidget( splitter );
@@ -120,4 +130,9 @@
mGeneralView->append( QString( "<font color=\"red\">%1: %2</font>" ).arg( \
componentName, msg ) ); }
+void DebugWidget::enableDebugger(bool enable)
+{
+ mDebugInterface->setTracer( enable ? QLatin1String( "dbus" ) : QLatin1String( \
"null" ) ); +}
+
#include "debugwidget.moc"
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/debugwidget.h #860585:860586
@@ -29,6 +29,7 @@
class QTabWidget;
class ConnectionPage;
+class DebugInterface;
class DebugWidget : public QWidget
{
@@ -44,10 +45,13 @@
void warningEmitted( const QString&, const QString& );
void errorEmitted( const QString&, const QString& );
+ void enableDebugger( bool enable );
+
private:
QTextEdit *mGeneralView;
QTabWidget *mConnectionPages;
QHash<QString, ConnectionPage*> mPageHash;
+ DebugInterface *mDebugInterface;
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic