Next Previous Table of Contents

### 14. General Configuration

This chapter describes how you can set your individual preferences about how KDevelop works. All settings addressed below can be found by the according entry in the Options-menu.

### 14.1 Configuring the Tools Menu

As KDevelop supports the use of third-party programs within it's user interface, you are able to configure any program that suits your needs towards application development. This can be done by adding programs to the already pre-defined ones in the "Tools"-menu. To change the tools-menu, select "Tools" from the "Options" menu. This dialog allows to specify the entry name, program and additional command line options you want to pass to the execution. To remove a program from the menu, select the entry name and choose "Delete". To add a program, specify the menuentry, where a & is used as a menu-accelerator; you may compare the already configured entries with the entry list. Select the binary and pass your commandline options. Then hit "Add" and the entry is added to the list. After leaving the configuration dialog, the tools-menu updates itself, so the new configuration is already usable without restarting KDevelop.

### 14.2 File Viewer Options

The Logical File Viewer can be configured by context menus completely. As it's intention is to separate files logically to keep a better overview over complex projects, one of the most used configurations is to create file groups. Those can be set by opening the context menu with a right mouse button click over the project icon displayed at the root of the tree. The menu offers:

- New File: Opens the New File dialog. Equals to the menubar command "File"-"New"
- New Class: Opens the Classgenerator to create a new class. Equals to the menubar command "Project"-"New Class"
- New Group: Opens a dialog to create a new group. There, set the group name and the file filter for the project files that will be displayed in this group.
- Show relative path: displays the files with their path name starting from the main project directory if checked; otherwise only the filename is shown.

Over a group folder, the according context menu offers:

- New Group: Opens the New Group dialog as in the context menu described above.
- Remove group: removes the group from the LFV.
- Properties: Opens the properties of the group. There, you can edit the file filters by a list of wildcards separated by commas.

### 14.3 KDevelop Setup

Make-command: The General Options dialog lets you configure KDevelop's general settings. First, you should set the make-command available on your system. If the selected program does not exist, KDevelop will warn you the next time you're invoking a make command.

Autosave:

If Autosave is checked, KDevelop will save all changed files periodically. The autosaving time range can be set to 3, 5, 15 or 30 minutes.

Autoswitch:

If Autoswitch is enabled, the KDevelop windows will switch on and off according to the usage context, e.g. if you switch to a documentation in the Help-menu, the Documentation browser will be opened, together with the documentation tree and the output window turned off.

Startup:

For starting KDevelop, you have the option to enable/disable the start-logo to be shown during the time KDevelop loads. Further, if you don't like the last project to be opened on startup, you can disable the default behavior.

### 14.4 Changing Keyboard Shortcuts

The Configure Keys dialog lets you configure the KDevelop key bindings. Note that global keys can be configured in the KDE Control Center, such as open file and print. A key function can be configured by choosing the menu entry. Then the configuration can be changed by checking values like the Alt / Ctrl key etc.

### 14.5 Documentation

#### Directories

For setting up the documentation browser to work correctly, KDevelop needs some information about where the HTML-documentation is placed on the system. Therefore, the Documentation Path properties dialog needs the path of the Qt- online documentation in HTML as well as the path to the KDE-Library documentation.

Usually, the Qt-Documentation is placed in the same directory where Qt is installed; e.g. if Qt resides in /usr/local/qt, the path you have to enter is /usr/local/qt/html. For the KDE- Documentation, you have to set the directory to the root of the documentation, assumed all KDE-Libs documentation resides in the same directory. Both path's can be selected by pressing the according buttons, displaying a path-selection. If your system doesn't contain the documentation for the KDE-libs, you should first enter the next configuration dialog, Update KDE-Documentation. This will create the documentation to a path of your choice, also setting the KDE Library Doc path automatically.

#### Options

#### Update KDE-Documentation

For those users who don't have a recent documentation of the KDE-libraries, especially the documentation for the files installed on the system, the Update KDE-Documentation dialog creates a new one or updates existing documentations. This function requires your system to have KDoc and qt2kdoc installed, included in the KDE-SDK package. First of, you have to set up the path to your recent kdelibs sources, which is not the include-path for KDE ! Just enter the path to the sources, like: /home/rnolden/kdelibs-1.1/.

Then, you can choose three different installation modes, as:

- Delete old Documentation and install to recent Documentation-path: this assumes that you already have a documentation installed and is placed in the path the Documentation Path-dialog was entered. This will delete all documentation and install the newly generated documentation into the recent path.
- Delete old Documentation and install to new Documentation-path: this will result in deleting the old documentation as well as above, but gives you the choice to set up a new documentation place.
- Leave old Documentation untouched and install to new Documentation path: This is recommended for a new generation of the kdelibs documentation for users who didn't have one before and for those who want to keep the last documentation for an older kdelibs version.

The "new KDE Libs Documentation path" is to be set for option 2 and 3 of the installation mode. This is also recommended for users who generate a new documentation from scratch.

After pressing the OK button, KDevelop will create a subdirectory "KDoc-reference" in the documentation path containing the KDoc reference files. First, the qt library documentation classes will be indexed to connect the Qt documentation with the documentation to be generated for the kdelibs. So it is important that you have set up the Qt documentation path first to ensure that it can be found by `qt2kdoc`. Finally, the KDE libs will be indexed and the documentation will be build with cross-references to give browsing the most functionality.

#### Comment

NOTE: When using KDoc 2, you can add a set of documentation for the the libraries in the KDE-Base and KOffice package. To do this, create the KDE-Libs documentation as described above. Then reopen the dialog and choose the path to the `kdoc.rules` file in the kdebase package resp. the koffice package, which is located in kdebase in the root directory of the sources, in KOffice in koffice/lib. Select option 3 (Leave old Documentation untouched) and leave the output path below that option as it is. This will keep the kdelibs documentation and generate the kdebase-libraries (resp. the koffice-libraries) documentation to the same location with cross-references to the kdelibs documentation additionally. After generating the documentation the libraries are available in the documentation tree automatically. For further KDE packages coming with additional libraries you should look for the `kdoc.rules` file to generate additional documentation as with the KDE-Base and KOffice packages.

#### Create Search Database

The Create Search Database dialog, accessed via the create-button, allows the programmer to create a database to search for a keyword interactively. To create and use the documentation search function, you must have the program glimpse 4.0 or ht://Dig installed. Preset are the options to index the given KDE-Library documentation as well as the Qt-Documentation, assuming the path to the documentation files were set in the "Documentation Path" dialog of the options- menu. Additionally, the index can include directories the user can set up himself by the "additional directories to index"-field. After setting a path to an additional directory, the "Add" - button must be pushed to set the path. A path once set can be removed from the index by selecting the path in the path field and pushing "Remove". Furthermore, the user is offered three different modes for the index size: tiny, small and medium. The higher the index size, the more the index files will grow. On the other hand, a search in a bigger search-database will be faster and more successful, so we suggest choosing a "medium" size. For using the search function, see section Using the Documentation Browser.

#### Create also KDOC-reference of your project

This option allows you to create a cross-reference file for your project when generating the API documentation with KDoc. The cross-reference file will be placed in the references directory and make your project available in the documentation tree. If you donīt have write access to the directory containing the reference files you have to uncheck this option to generate the API documentation without errors.

### 14.6 Debugger

The default setup for KDevelop is to use the internal debugger. Click on "Use external debugger" if you wish to use a different debugger and enter the name of the debugger to use. See your debuggers documentation on how to run it. Selecting the internal debugger enables an additional set of options you can choose from:

- Display static members: Displaying static members makes gdb slower in producing data within kde and qt. It may change the "signature" of the data which QString and friends rely on. But if you need to debug into these values then check this option.
- Display mangled names: When displaying the disassembled code you can select to see the methods mangled names. However, non-mangled names are easier to read.
- Try setting BPs on lib load: This will try to set pending breakpoints on loading a library. If GDB hasn't seen a library that will be loaded via "dlopen" then it will refuse to set a breakpoint in that code. We can get gdb to stop on a library load and hence try to set the pending breakpoints. See Shared libraries and breakpoints for more details and a "gotcha" relating to this behaviour. If you are not "dlopen"ing libs, leave this off.
- Enable floating toolbar: This will allow you to use the floating toolbar to control the debugger in addition to the menu and buttons. The toolbar is most useful for debugging GUI applications. For details see The floating toolbar.
- Enable separate terminal for application i/o: This allows you to enter terminal input when your application contains terminal input code (eg cin, fgets etc.). If you use terminal input in your app, then tick this option. Otherwise leave this off.

### 14.7 Setting Paths

On the paths tab you can enter the paths to your Qt 2.x and KDE 2 installations as well as where to create new projects. To learn more about installing Qt 2.x / KDE 2 and configuring KDevelop for Qt 2.x and KDE 2 read the KDE Application Tutorials.

The default location for KDevelop to create new projects is in the user's home directory. If you want to change this behaviour you can enter the desired location into the default project path field.

Next Previous Table of Contents