KDevelop: Rapid C++ Programming
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 64 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/45932 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 201117 / 64
3
7
10
11
17
19
21
28
33
34
35
37
40
44
48
49
52
55
57
59
62
63
64
00:00
Computer programmingMereologyMultiplication sign1 (number)Formal languageComputer animationXML
00:21
Electronic mailing listCodeCodeWritingBit rateComputer animation
00:42
Letterpress printingConfiguration spaceSocial classGreen's functionText editorType theoryGraph coloringNamespaceCodeVariable (mathematics)Integrated development environmentFunctional (mathematics)Arithmetic meanComputer animation
02:36
Complete metric spaceSpacetimeCodeMacro (computer science)Template (C++)Simulated annealingEmbedded systemParameter (computer programming)Function (mathematics)Host Identity ProtocolInclusion mapMenu (computing)Cursor (computers)Arrow of timeSymbol tableLink (knot theory)Key (cryptography)Keyboard shortcutOpen setHydraulic jumpComputer fileSocial classExecution unitCodeParameter (computer programming)Context-sensitive languageSource codeProjective planeDeclarative programmingComputer fileFunctional (mathematics)InformationLink (knot theory)Game controllerOpen setError messageMacro (computer science)Line (geometry)ConcentricComplete metric spaceSocial classHydraulic jumpOcean currentGoodness of fitNeuroinformatikComputer fontIntegrated development environmentVector potentialInformation overloadConstructor (object-oriented programming)Normal (geometry)Key (cryptography)Type theorySpacetimeCombinational logicPattern languageMultiplication signElectronic mailing listMenu (computing)Validity (statistics)Keyboard shortcut1 (number)CASE <Informatik>Object (grammar)Pointer (computer programming)Matching (graph theory)Symbol tableCursor (computers)Endliche ModelltheorieInsertion lossSoftware frameworkDirection (geometry)Message passingVulnerability (computing)Inclusion mapPersonal digital assistantComputer clusterSimilarity (geometry)Level (video gaming)Queue (abstract data type)Computer animation
08:47
Electronic signatureSynchronizationMathematicsEmailImplementationVariable (mathematics)Personal digital assistantInclusion mapSpacetimeFunction (mathematics)Social classElectronic mailing listConstructor (object-oriented programming)Physical systemType theoryFunctional (mathematics)Personal digital assistantAngleDeclarative programmingQueue (abstract data type)Social classIterationImplementationBlock (periodic table)Computer fileExpressionCartesian coordinate systemElectronic signatureVariable (mathematics)Message passingEmailCodeVarianceInformation overloadComputer animation
10:58
CodeComplete metric spacePolymorphism (materials science)Inheritance (object-oriented programming)Virtual realityFunction (mathematics)Information overloadSpacetimeMaxima and minimaImplementationPersonal digital assistantSocial classFunctional (mathematics)Email1 (number)FlagComputer fileInformation overloadPhysical systemSpacetimeCodeGame controllerComplete metric spaceFluid staticsReal numberComputer animation
11:42
FreewareComputer animation
12:14
XML
Transcript: English(auto-generated)
00:07
Hi everyone. Yeah, 15 minutes is not much time for K-develop, so I concentrate on one part of it, mainly, in my opinion, one of the most important ones, the C++ language support.
00:22
And in my opinion, what makes us stand apart is that we try to understand your C++ code, which enables us to support quite a lot of nice features, making it possible to help you write C++ code in a much faster way. So let's start with quite a simple thing I would say. Syntax
00:46
highlighting is one of the most basic features every IDE and editor needs, and C++ is pretty hard to highlight because essentially what you need is to parse the code and to understand it, to do it properly, because this is something like no highlighting, of course. It's not very
01:05
good to find an overview there, right? So let's see how the normal editor does it. It just has a bunch of keywords it highlights, basically. So of course it's better already, but you still cannot really differentiate between what is what at a single glance, like what is the function,
01:24
what is the typedef, what is the namespace, what is the custom class, whatever. So take a look at how K-Develop does it. We parse the code, we understand it, we analyze it, we put lots of shiny colors on it, and they actually have a meaning. I mean, look at it. The namespaces are
01:41
red, the typedefs have a dark green, custom types have a bright green, and functions are blue, methods from the same class are yellow, and all that. So just a quick glance at the code, you can find out what is what, and this is really, really neat. And actually we can do more. If
02:02
you look at the bottom function, the variables are still all just bold and black, but if you turn on local colorization, we do magic and put the rainbow in there, and this really helps if you think about the three variables called VL, V1, and VY. If you don't have any highlighting,
02:28
they look nearly the same, but with color highlighting you can differentiate them very easily. So you can configure all that to your likings. What else do we have? Code completion, of course. Very important as well, and we hope that it just works. It does for most things, like
02:49
here I call some function which returns a something Q weak pointer-ish, and as you can see, it just parses the code, understands what is returned from the function, and offers you the
03:01
correct code completion. But you can also use macros if you want to. There are lots of frameworks I think which force you to use macros for quite a lot of functions, and it works as well. So this is for us the same as you would write ASDF and call that function directly. But we also understand template code. So Q weak pointer is the pointer of the foo class up there
03:29
with the bar in there, and bar is just a typedef to Q object, and we understand that all and show you the correct code completion in this case. And I think this is really, really neat
03:40
and helps you to write code very fast. What else do we have? Context-sensitive information. Quite a lot of that. Here it's just code completion as before, but if I press ALT or use the mouse to click into the completion model, we show more information about the function you're
04:01
about to execute. And we show you where it's defined, you can jump to the declaration, we show inline documentation. It's really neat, and this way you don't have to look at this kind of documentation in a manual or anything. It's all there when you need it.
04:21
We also show which function argument you're in right now. For example here I'm in a constructor of QLineEdit. I requested code completion with control space, and up above the normal completion list I show the three overloads for the constructor, and you can see what you
04:43
want to do, and what you should insert there as a type for the parameters. We do best matching. That means the items in the completion list that are greenish in the left column are supposed to be proper matches for the current function argument you're in.
05:06
So this way you often don't have to search in the possibly quite large list of valid completion items, but the most important ones are always at the top. This is very far code completion going through the include paths for your project,
05:25
and it just works as you would imagine. So code navigation. Similar to what I showed before in code completion with pressing alt, you can also move the cursor around in your code and press alt or hover a declaration or use or whatever with your mouse, and we will show this
05:44
little pop-up there giving you information about the symbol under the cursor. And you can click on the links in there and jump to the declaration or show the uses of that declaration and everything. It's very helpful and makes it possible to analyze new code very fast.
06:04
And we show macro definitions, which is sometimes very useful as well to see what is actually going on, especially if you write code and it shows you a pass error in line and you use the see the syntax error there, continue. Quite nice.
06:24
Includes. This is mainly useful to jump to the declaration. You could of course just control click on the include and it will open the file, but this is also good to give you a rough overview about what this include is supposed to do. The pop-up I showed before
06:45
gives you the ability to browse code. And in my opinion, browsing code is also one of the most outstanding features of KDevelop. Many other ADEs support that as well, but we really stress it and put it to the next level. And if you look at the pop-up, you can use alt keys,
07:08
for example, to browse through it and press enter, jump to the queue list concentrator, jump back, and you don't have to use anything else except KDevelop to view the source code in a good way.
07:23
And of course we have this funny toolbar at top, which enables you to use the IDE similar to a browser if you're looking at code. Like you can jump back, forwards, search, use the outline of a file, all that. It's very helpful. And as you can see here, this is just the
07:42
navigation menu. We have lots of features, lots of shortcuts, and eventually you will start to learn them and it makes you really fast in jumping around your code. And it's very important that you learn this if you want to use KDevelop in its full potential. So another thing, QuickOpen,
08:04
is also a toolbar up top, but you can use the shortcuts to open the dialog as well. And this way you are so fast to open any file, any class, or any function, or any combinations of these in your code. You just hit the shortcut, insert some pattern like, I don't know,
08:25
the foo bar, and it shows you every file which has foo bar in its path in your open projects or in your include path, however you want to configure it. I personally use this like 90% of the time and only the normal control O file open dialog in the other 10%, if at all.
08:45
So this is really a good feature as well. And what else do we have? Assistance. These are little helpers that are supposed to take the mundane tasks and do them for you.
09:01
For example, if you separate the implementation from the definition and have a function like this, and I just added the const foo stuff to the constructor, and it tells me like, do you want to update the declaration signature? And if I would now press alt 1 or
09:20
go with the mouse to the 1 and click on that, it would automatically update the different declaration up there. It's really, really neat. The same goes for renaming variables. For example, imagine it was before in my var in the class and I renamed it to my var 2, it offers me to, do you want to rename all
09:44
users of that variable? It works as you would expect. It's a new feature in KDevelop 4.2, by the way. There's a declaration assistant. You can write like an expression without the types, and it offers you, like, do you want to declare that as a local variable?
10:03
And it will add the type to that variable. And you can also declare it as a public variable in the class, and if you do that in the CPP file, it will automatically add it in the header, and it's very cool. It's also very useful if you work with iterators a lot, like you have something
10:21
queue list, const begin. You don't want to remember the long blob of type. You just write it equals list dot const begin, hit alt 1, and it will add the type in front. It's very useful. There's also a missing include assistant, like here I use the queue application without having
10:42
it included anywhere, and now KDevelop offers me, do you want to add the include for that file, because I found it in your include path, or instead do you want to use a forward declaration for this class? And this is also very neat. There is a overload assistant similar to code
11:04
completion. You write your class, inherit from a virtual class and just do control space in the body, and it tells you, like, do you want to overwrite the pure static ones marked with a little red flag? Do you have to do those? Or the other virtual functions, if you like to.
11:22
Then you switch to the CPP file, do the same control space, and assume that I just added these, like, five functions up there to the header. I can now press, like, execute this item, and it will write the function body there for me, and I can just write the real code I'm interested in.
11:44
So, do you have any other questions for me? Nothing? Too fast? So, yeah, thank you.
12:05
Yes, I'll be at the KDE booth if anyone has questions about KDevelop, or Master Visualize, or anything. So, yeah, thank me there. Thanks.