[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kate] part/document: Add print() method to the documents D-Bus
From:       Christian Loose <christian.loose () hamburg ! de>
Date:       2011-08-19 17:20:09
Message-ID: 20110819172009.4B526A60BB () git ! kde ! org
[Download RAW message or body]

Git commit c72e8edae0b98c729ed1214f7752afb0c9c1e933 by Christian Loose.
Committed on 18/08/2011 at 22:26.
Pushed by cloose into branch 'master'.

Add print() method to the documents D-Bus interface

Mark print() method in the KateDocument as Q_SCRIPTABLE and expose it
on the D-Bus session bus.

example:
qdbus org.kde.kate-7762 /Kate/Document/1 print

FEATURE: 246440
FIXED-IN: 4.8.0
REVIEW: 102346

M  +1    -1    part/document/katedocument.h
M  +1    -1    part/document/katedocument.cpp

http://commits.kde.org/kate/c72e8edae0b98c729ed1214f7752afb0c9c1e933

diff --git a/part/document/katedocument.cpp b/part/document/katedocument.cpp
index 131718c..76a5ff2 100644
--- a/part/document/katedocument.cpp
+++ b/part/document/katedocument.cpp
@@ -194,7 +194,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool \
bBrowserView,  pathName = pathName.arg (++dummy);
 
   // my dbus object
-  QDBusConnection::sessionBus().registerObject (pathName, this);
+  QDBusConnection::sessionBus().registerObject (pathName, this, \
QDBusConnection::ExportAdaptors | QDBusConnection::ExportScriptableSlots);  
   // register doc at factory
   KateGlobal::self()->registerDocument(this);
diff --git a/part/document/katedocument.h b/part/document/katedocument.h
index 42cdeb6..750b5c1 100644
--- a/part/document/katedocument.h
+++ b/part/document/katedocument.h
@@ -491,7 +491,7 @@ class KATEPART_TESTS_EXPORT KateDocument : public \
KTextEditor::Document,  //
   public Q_SLOTS:
     bool printDialog ();
-    bool print ();
+    Q_SCRIPTABLE bool print ();
 
   //
   // KTextEditor::DocumentInfoInterface ( ### unfinished )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic