All pastes #968409 Raw Edit

kdelibs patch

public diff v1 · immutable
·published 2008-04-03 00:36 UTC
rendered paste body
--- interfaces/ktexteditor/editor.h     (revisione 793081)+++ interfaces/ktexteditor/editor.h     (copia locale)@@ -217,7 +217,7 @@      * translated.      * \param number index of config page      * \return name of given page index-        * \see configPageFullName(), configPagePixmap()+     * \see configPageFullName(), configPagePixmap()      */     virtual QString configPageName (int number) const = 0;@@ -230,7 +230,7 @@      * something like "Shortcut Configuration".      * \param number index of config page      * \return full name of given page index-        * \see configPageName(), configPagePixmap()+     * \see configPageName(), configPagePixmap()      */     virtual QString configPageFullName (int number) const = 0;@@ -253,6 +253,13 @@     void documentCreated (KTextEditor::Editor *editor,                           KTextEditor::Document *document);+    /**+     * The \p debugScript emits the message generated by the debug javascript+     * function.+     * \param debug message+     */+    void debugScript(const QString&);+   private:     class EditorPrivate* const d; };Index: kate/utils/kateglobal.cpp===================================================================--- kate/utils/kateglobal.cpp   (revisione 793081)+++ kate/utils/kateglobal.cpp   (copia locale)@@ -393,6 +393,11 @@   return KIcon("document-properties"); }+void KateGlobal::debugScriptMsg(const QString& message)+{+  emit debugScript(message);+}+ KateGlobal *KateGlobal::self () {   if (!s_self) {Index: kate/utils/kateglobal.h===================================================================--- kate/utils/kateglobal.h     (revisione 793081)+++ kate/utils/kateglobal.h     (copia locale)@@ -152,6 +152,16 @@     KIcon configPageIcon (int number) const;   /**+   * Debug+   */+  public:+    /**+     * Emit debug message via \p debugScript signal+     * \param message the message to be emitted+     */+    void debugScriptMsg(const QString& message);++  /**    * Kate Part Internal stuff ;)    */   public:Index: kate/jscript/katejscript.cpp===================================================================--- kate/jscript/katejscript.cpp        (revisione 793081)+++ kate/jscript/katejscript.cpp        (copia locale)@@ -177,6 +177,7 @@       // Don't use kDebug here -- it makes developing indenters without a debug       // build almost impossible for new people       std::cerr << qPrintable(args[0]->toString(exec).qstring()) << std::endl;+      KateGlobal::self()->debugScriptMsg(args[0]->toString(exec).qstring());       return KJS::jsUndefined();     default:       break;