• Developers

    Kate Test Regression Suite

    by  • 2009-06-7 • Developers

    This blog is mainly about documenting the process how to run Kate Part’s test regression suite and probably not much use for other developers. Step I: Setup the environment create the file ~/.testkateregression. The content of this file is a single line pointing to the folder of the checkout of the test regression suite data. [...]

    Read more →

    Kate linter plugin

    by  • 2009-01-15 • Developers, Users

    Just a quicky: I wrote a little plugin for KTextEditor which supplies you with basic error checking when you save documents. Currently only PHP (via php -l) and JavaScript (via JavaScript Lint) are supported.

    Screenshots

    PHP error
    list of errors

    Read more →

    Kate Internals: The Undo/Redo System

    by  • 2008-11-14 • Developers

    The Kate Editor Component (also called KatePart) has its own undo/redo system. It did not change much since KDE2 and basically it is very simple. Meanwhile there are classes for undo/redo support in Qt as well. In fact both systems are very similar. This article focuses on Kate Part’s system. Text Operations First we have [...]

    Read more →

    Encapsulation is not Information Hiding

    by  • 2007-12-21 • Developers

    As food for thought and in reply to Why Encapsulation is a Good Thing it’s interesting to take a closer look. What does encapsulation mean exactly, and what can you do with it? Maybe what you really want is Information Hiding? …and encapsulation is just a way of possibly achieving it? If you are interested [...]

    Read more →

    Memory Leak Continued

    by  • 2007-11-22 • Developers

    There was some confusion with regard to my last blog about leaking memory. Suppose the ui_mywidget.h files looks like this: class Ui_Widget { public: QGridLayout *gridLayout; QGroupBox *groupBox; QGridLayout *gridLayout1; QListWidget *listWidget; QSpacerItem *spacerItem; QPushButton *pushButton; void setupUi(QWidget *Widget); void retranslateUi(QWidget *Widget); }; Of course, those 6 QObject derived classes are deleted. But the sizeof(Ui_Widget) [...]

    Read more →

    Memory leak: Ui files and direct approach

    by  • 2007-11-21 • Developers

    The KDE codebase often uses a forward declaration in the .h-file to speedup compilation. The code often looks like this: // header file namespace Ui { class MyWidget; } class MyDialog : public KDialog { // … private: Ui::MyWidget *ui; }; The impl looks like this: // source file #include “mydialog.h” #include “ui_mywidget.h” MyDialog::MyDialog() : [...]

    Read more →

    Kate Scripting: Indentation

    by  • 2007-07-18 • Developers, Users

    Kate Part in KDE4 supports the ECMAScript (JavaScript) language by using kjs. In KDE3 we had several hard-coded indenters in C++, the idea is to let scripts do all the indentation in KDE4. How does it work? It is similar to vim: You simply create a script in the directory $KDEDIR/share/apps/katepart/jscript. An indentation script has [...]

    Read more →

    Writing a Kate Plugin

    by  • 2004-01-6 • Developers

    Introduction First at all, why writing plugins for an editor ? Good question, and I hope I have a good answer: Because we want Kate to be small and all extended features not all users need should go into plugins (like CVS suppport, project managment, coffee cooking Therefore Kate provides a quite full-featured plugin interface [...]

    Read more →