You are not logged in.

1

Sunday, November 13th 2011, 1:58am

Huge amount of signals and emit

Hi,
I'm new in this forum. (I'm sorry in advance for my bad english.) :D
I have a problem because I need to manage big amount of signals, for example:

Source code

1
2
3
4
signals:
void GGPA_1(QString);
...
void GGPA_8192(QString);

So... when I try to emit a signals... I need a switch with 8192 case!!!
Is possible to solve otherwise?
I think no, but I try!
I have a class with 20k+ lines. :(

Thanks!!!
S.

2

Sunday, November 13th 2011, 9:05pm

you have 8192 signals in a class with 20k lines. That is your problem - ridiculous design.

If you want help to fix it, tell us what you are trying to achieve.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

3

Monday, November 14th 2011, 6:39am

Instead of having 8192 signals, you can have a single signal mapper to achieve your problem...

4

Monday, November 14th 2011, 9:35am

as things stand, you'd still need 8k lines minimum just to do the mappings. The behemoth needs a massive redesign with probably need *many* abstractions and layers of indirection added so that classes of reasonable size are achieved.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

5

Monday, November 14th 2011, 10:14am

Its not like that, we can Map all those within some just around 10 lines of code.

6

Monday, November 14th 2011, 5:19pm

Its not like that, we can Map all those within some just around 10 lines of code.

I dont think you can with 8k different signal names.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar threads

Used tags

emit, signals