Kdevelop5/Manual/Meet KDevelop/de: Difference between revisions

    From KDE UserBase Wiki
    (Created page with "dann wird KDevelop sich gemerkt haben, dass <code>my_ride</code> in der letzten Zeile eine Variable des Typs <code>Car</code> ist. Demzufolge wird es Ihnen anbieten, <code>ge<...")
    (Created page with "Im zweiten Beispiel nehmen wir an, dass Sie folgenden Quelltext haben:")
    Line 39: Line 39:




    As a second example, assume you have code like this:
    Im zweiten Beispiel nehmen wir an, dass Sie folgenden Quelltext haben:





    Revision as of 07:22, 27 August 2017


    Was ist KDevelop?

    KDevelop ist eine moderne integrierte Entwicklungsumgebung (IDE) für C++ (und andere Sprachen) und teil der zahlreichen KDE-Anwendungen. Als solche läuft es unter Linux (selbst wenn Sie einen der anderen Desktops wie Gnome verwenden) aber auch unter den meisten anderen Unix-Varianten und unter Windows.


    KDevelop liefert alle Vorzüge moderner IDEs. Für große Projekte und Anwendungen ist die wichtigste Tatsache, dass KDevelop C++ versteht: Es durchsucht den gesamten Quelltext und merkt sich, welche Klasse welche Funktionen hat, wo Variablen definiert sind, was deren Typen sind und viele andere Dinge in Ihrem Quelltext. Nehmen wir zum Beispiel an, dass eine Header-Datei in Ihrem Projekt folgende Klasse deklariert


    class Car {
      // ...
      public:
        std::string get_color () const;
    };
    


    und später in Ihrem Programm haben Sie dann


    Car my_ride;
    // ... mache etwas mit dieser Variable ...
    std::string color = my_ride.ge
    


    dann wird KDevelop sich gemerkt haben, dass my_ride in der letzten Zeile eine Variable des Typs Car ist. Demzufolge wird es Ihnen anbieten, ge als get_Color() zu vervollständigen, da dies die einzige Methode der Klasse Car ist, die so startet. Statt weiterzutippen, betätigen Sie einfach Enter um das vollständige Wort zu erhalten. Das spart Tippzeit, verhindert Tippfehler und führt dazu, dass es nicht mehr notwendig für Sie ist, alle Funktionen und Klassen in sehr großen Projekten zu merken.


    Im zweiten Beispiel nehmen wir an, dass Sie folgenden Quelltext haben:


    double foo ()
    {
      double var = my_func();
      return var * var;
    }
    
    
    double bar ()
    {
      double var = my_func();
      return var * var * var;
    }
    


    If you hover the mouse over the symbol var in function bar you get the option to see all uses of this symbol. Clicking on it will only show you the uses of this variable in function bar because KDevelop understands that the variable var in function foo has nothing to do with it. Similarly, right clicking on the variable name allows you to rename the variable; doing so will only touch the variable in bar but not the one with the same name in foo.


    But KDevelop is not just an intelligent code editor; there are other things KDevelop does well. Obviously, it highlights the source code in different colors; it has a customizable indenter; it has an integrated interface to the GNU debugger gdb; it can show you the documentation for a function if you hover the mouse over a use of this function; it can deal with different kinds of build environments and compilers (e.g. with make and cmake-based project), and many other neat things that are discussed in this manual.