From kde-release-team Mon Feb 08 19:43:16 2010 From: Milian Wolff Date: Mon, 08 Feb 2010 19:43:16 +0000 To: kde-release-team Subject: Last-Minute API-Change to 4.4 Kate Interface possible? Message-Id: <201002082043.16524.mail () milianw ! de> X-MARC-Message: https://marc.info/?l=kde-release-team&m=126570839008626 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0887545419==" --===============0887545419== Content-Type: multipart/signed; boundary="nextPart316416541.OpJ3yxHV6v"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart316416541.OpJ3yxHV6v Content-Type: multipart/mixed; boundary="Boundary-01=_UlGcLqhNXPzCCB8" Content-Transfer-Encoding: 7bit --Boundary-01=_UlGcLqhNXPzCCB8 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Team! I sadly have to admit that I messed up a new API in the HighlightInterface = for=20 Kate which was not spotted in the review period until just now by Jowenn: KTextEditor::Document has the methods mode() and modes() and also=20 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 las= t- minute hickup? See Patch attached. If it doesn't get in I'll simply deprecate the Interface for 4.5 and do it= =20 properly then. It's just a huge inconvenience for anybody (=3D=3D Developer= ) that=20 would like to use the new API. As you can see it is very confusing already = (it=20 got me already while implementing it :D) and I don't want to make it even m= ore=20 confusing with the new Interface I'm really sorry! Maybe if something more important turns up that also requires a change, you= =20 could push this one in as well? Anyway... I just wanted to try! Good night =2D-=20 Milian Wolff mail@milianw.de http://milianw.de --Boundary-01=_UlGcLqhNXPzCCB8 Content-Type: text/x-patch; charset="UTF-8"; name="highlightingModes-HighlightInterface-rename.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="highlightingModes-HighlightInterface-rename.patch" diff --git a/interfaces/ktexteditor/highlightinterface.h b/interfaces/ktext= editor/highlightinterface.h index 09d444b..9c95dd7 100644 =2D-- 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 curre= nt Document. * =2D * \see KTextEditor::Document::mode() + * \see KTextEditor::Document::highlightingMode() */ =2D virtual QStringList embeddedModes() const =3D 0; + virtual QStringList embeddedHighlightingModes() const =3D 0; =20 /** * \brief Get the highlight mode used at a given position in the docum= ent. @@ -144,12 +144,12 @@ class KTEXTEDITOR_EXPORT HighlightInterface * Retrieve the name of the applied highlight mode at a given \p posit= ion * in the current document. * =2D * \see modes() + * \see highlightingModes() * * TODO: I intended to make this const but Kate's implementation needs= to * call kateTextline which is non-const. Solution? */ =2D virtual QString modeAt(const Cursor &position) =3D 0; + virtual QString highlightingModeAt(const Cursor &position) =3D 0; }; =20 } diff --git a/kate/document/katedocument.cpp b/kate/document/katedocument.cpp index e903013..9a5bd8c 100644 =2D-- a/kate/document/katedocument.cpp +++ b/kate/document/katedocument.cpp @@ -5558,12 +5558,12 @@ QList< KTextEditor::HighlightInterface::AttributeBl= ock > KateDocument::lineAttri return attribs; } =20 =2DQStringList KateDocument::embeddedModes() const +QStringList KateDocument::embeddedHighlightingModes() const { return highlight()->getEmbeddedModes(); } =20 =2DQString KateDocument::modeAt(const KTextEditor::Cursor& position) +QString KateDocument::highlightingModeAt(const KTextEditor::Cursor& positi= on) { KateTextLine::Ptr kateLine =3D kateTextLine(position.line()); =20 diff --git a/kate/document/katedocument.h b/kate/document/katedocument.h index 3ed6f92..1b8a047 100644 =2D-- a/kate/document/katedocument.h +++ b/kate/document/katedocument.h @@ -1070,8 +1070,8 @@ class KATEPART_TESTS_EXPORT KateDocument : public KTe= xtEditor::Document, public: virtual KTextEditor::Attribute::Ptr defaultStyle(const KTextEditor::Hi= ghlightInterface::DefaultStyle ds) const; virtual QList< KTextEditor::HighlightInterface::AttributeBlock > lineA= ttributes(const unsigned int line); =2D virtual QStringList embeddedModes() const; =2D virtual QString modeAt(const KTextEditor::Cursor& position); + virtual QStringList embeddedHighlightingModes() const; + virtual QString highlightingModeAt(const KTextEditor::Cursor& position= ); =20 protected Q_SLOTS: void dumpRegionTree(); --Boundary-01=_UlGcLqhNXPzCCB8-- --nextPart316416541.OpJ3yxHV6v Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAktwaVQACgkQDA6yEs0dE5NmcgCePnDmX+oep6jWClxnOLLHaBST IaYAn2zpqANabak5tOLTvkFAJn5CGODn =PlKS -----END PGP SIGNATURE----- --nextPart316416541.OpJ3yxHV6v-- --===============0887545419== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ release-team mailing list release-team@kde.org https://mail.kde.org/mailman/listinfo/release-team --===============0887545419==--