Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

a Qt plugin : QtPregenForCB => AddOnForQt

<< < (6/16) > >>

oBFusCATed:
This is how you send and event:

--- Code: ---        CodeBlocksEvent evt(<event type>, <parameters>);
        Manager::Get()->ProcessEvent(evt);

--- End code ---

And you have to create one or more new events.
To see how to do it inspect the sdk_events.h/cpp files to see how the other events are declared/defined.
Copy/paste/modify the code until it fits you needs and post a patch.

LETARTARE:
Hello,
- new 'QtPregenForCB-0.4.2'
- it uses a new organization for use of two new events:

--- Quote ---'cbEVT_PRECOMPILER_STARTED' and
'cbEVT_PRECOMPILE_FILE'
--- End quote ---
I adapted 'CompilerGCC' to have a state machine with a state of more

--- Quote ---bsTargetPreGen
--- End quote ---
see
--- Code: ---'CompilerGCC::GetNextStateBasedOnJob()' and 'CompilerGCC::BuildStateManagement()'
--- End code ---

I provide a patch to svn 10118, see to :
https://github.com/LETARTARE/QtPregenForCB

Best regards

oBFusCATed:
I hope you know that in the c++ world precompile and precompiled mean totally different things. So if these features stay, then you'll need to find better names.  Probably use a name similar to already use names like xxxxPreBuild.

Have you tried the solution I've proposed? What are its problems? Because the propose solution looks way more complex than it needs to be.

p.s. This struct "struct s_rebuild { bool workspace, clean, build; } ;" should be made public, if the code stays the same.

LETARTARE:
Thank you for watching.
I suspected that the names will be to adapt. No problem, I look...
I used what you recommended, but to treat all cases, I arrived at this solution.
I can have a workspace with very different projects (Compilers, libraries ...), and it works.
I can use context menus('Build file', ...).


--- Quote ---This struct "struct s_rebuild { bool workspace, clean, build; } ;" should be made public, if the code stays the same.
--- End quote ---
Of course, but I do not know where ?

oBFusCATed:

--- Quote from: LETARTARE on February 21, 2015, 08:16:42 pm ---I used what you recommended, but to treat all cases, I arrived at this solution.

--- End quote ---
What cases are not handled by my solution?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version