Development Tricks

Background
This page shows a list of time-saving workflow tips for Devs who are developing for Scribus. Feel free to add your shortcuts

Minimize compile time by specifying preferred language

 * Reduce the number of files copied in the "make install" step by limiting the number of used languages to the minimum necessary. For this, add:
 * to your cmake command if you only want english language GUI.

Manually copying object file to binary directory

 * If you know that only a single object file has been written by "make" (as an example when you're modifying the source of a plugin), if you're on a slow computer you can speed up the compile/run/tweak cycle by manually copying the object file to the binary directory, instead of doing "make install"

Use all CPU cores

 * Use all the cores of your CPU to compile faster. That's the -j option. If you got 8 cores, use : 'make -j8' and 'make install -j8' and you will make lot faster.

Traces in the terminal
Whenever you need to understand what happens in the code, it's possible to output traces in to the terminal using  function :

Note: Don't forget to CLEAN YOU CODE before issuing a patch

Qt

 * Qt Creator is a powerfull IDE. See QtCreator_-_workflow_for_Scribus_and_Git_repository_under_Linux

Coding standards
Please look at used standard in scribus's code and reproduce them. Sample : See Official:Coding_Standards for a very detailed list and lots of advices.
 * use tabs not spaces
 * correct { and } positionning
 * use spaces where needed

Submitting patches
Patches should be in plain text. is the best way of sending them. Please do not send patches to the main list. Remember to use -u (unified diff) as other types of diff are painful to use.

Please ensure that when you have changed something you put a comment immediately before the change. Ensure you put a date and who made the change and what the change is for. Over time, these will be weeded out, but it useful to see what has been altered.

Related

 * Low_Hanging_Fruit
 * How_Can_I_Help