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

List:       kde-release-team
Subject:    Last-Minute API-Change to 4.4 Kate Interface possible?
From:       Milian Wolff <mail () milianw ! de>
Date:       2010-02-08 19:43:16
Message-ID: 201002082043.16524.mail () milianw ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hello Team!

I sadly have to admit that I messed up a new API in the HighlightInterface for 
Kate which was not spotted in the review period until just now by Jowenn:

KTextEditor::Document has the methods mode() and modes() and also 
highlightingMode() and highlightingModes()

the new Interface now has currently the two methods

embeddedModes() and modeAt()

These two should be renamed to

embeddedHighlightingModes() and highlightingModeAt()

Would this still be possible or is the change too minor to justify this last-
minute hickup? See Patch attached.

If it doesn't get in I'll simply deprecate the Interface for 4.5 and do it 
properly then. It's just a huge inconvenience for anybody (== Developer) that 
would like to use the new API. As you can see it is very confusing already (it 
got me already while implementing it :D) and I don't want to make it even more 
confusing with the new Interface

I'm really sorry!

Maybe if something more important turns up that also requires a change, you 
could push this one in as well? Anyway... I just wanted to try!

Good night
-- 
Milian Wolff
mail@milianw.de
http://milianw.de

["highlightingModes-HighlightInterface-rename.patch" (text/x-patch)]

diff --git a/interfaces/ktexteditor/highlightinterface.h \
b/interfaces/ktexteditor/highlightinterface.h index 09d444b..9c95dd7 100644
--- a/interfaces/ktexteditor/highlightinterface.h
+++ b/interfaces/ktexteditor/highlightinterface.h
@@ -134,9 +134,9 @@ class KTEXTEDITOR_EXPORT HighlightInterface
      *
      * \return Returns a list of embedded highlighting modes for the current \
                Document.
      *
-     * \see KTextEditor::Document::mode()
+     * \see KTextEditor::Document::highlightingMode()
      */
-    virtual QStringList embeddedModes() const = 0;
+    virtual QStringList embeddedHighlightingModes() const = 0;
 
     /**
      * \brief Get the highlight mode used at a given position in the document.
@@ -144,12 +144,12 @@ class KTEXTEDITOR_EXPORT HighlightInterface
      * Retrieve the name of the applied highlight mode at a given \p position
      * in the current document.
      *
-     * \see modes()
+     * \see highlightingModes()
      *
      * TODO: I intended to make this const but Kate's implementation needs to
      * call kateTextline which is non-const. Solution?
      */
-    virtual QString modeAt(const Cursor &position) = 0;
+    virtual QString highlightingModeAt(const Cursor &position) = 0;
 };
 
 }
diff --git a/kate/document/katedocument.cpp b/kate/document/katedocument.cpp
index e903013..9a5bd8c 100644
--- a/kate/document/katedocument.cpp
+++ b/kate/document/katedocument.cpp
@@ -5558,12 +5558,12 @@ QList< KTextEditor::HighlightInterface::AttributeBlock > \
KateDocument::lineAttri  return attribs;
 }
 
-QStringList KateDocument::embeddedModes() const
+QStringList KateDocument::embeddedHighlightingModes() const
 {
   return highlight()->getEmbeddedModes();
 }
 
-QString KateDocument::modeAt(const KTextEditor::Cursor& position)
+QString KateDocument::highlightingModeAt(const KTextEditor::Cursor& position)
 {
   KateTextLine::Ptr kateLine = kateTextLine(position.line());
 
diff --git a/kate/document/katedocument.h b/kate/document/katedocument.h
index 3ed6f92..1b8a047 100644
--- a/kate/document/katedocument.h
+++ b/kate/document/katedocument.h
@@ -1070,8 +1070,8 @@ class KATEPART_TESTS_EXPORT KateDocument : public \
KTextEditor::Document,  public:
     virtual KTextEditor::Attribute::Ptr defaultStyle(const \
                KTextEditor::HighlightInterface::DefaultStyle ds) const;
     virtual QList< KTextEditor::HighlightInterface::AttributeBlock > \
                lineAttributes(const unsigned int line);
-    virtual QStringList embeddedModes() const;
-    virtual QString modeAt(const KTextEditor::Cursor& position);
+    virtual QStringList embeddedHighlightingModes() const;
+    virtual QString highlightingModeAt(const KTextEditor::Cursor& position);
 
   protected Q_SLOTS:
       void dumpRegionTree();


["signature.asc" (application/pgp-signature)]

_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team


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

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