On August 4, 2012 5:07:30 AM Tim E. Real wrote: > In trunk now. > > Introducing: More bits for Song Changed SC_* flags. > Added member Song::updateFlags2. > (Various song commands and undo/redo use the update flags). > Song::update() now takes an extra 'flags2' param, default is zero, > with a HACK: If flags is -1 (as in a call to update() with no params), > it is highly unlikely someone actually wanted all 32 flags bits set > but not flags2, so flags2 is also forced to -1 in that case. > > - Please beware these possible extra flags when writing songChanged > handlers and setting updateFlags. > No place uses them yet. We can recognize them as necessary, as we go, > by adding an extra flags2 param to the various songChanged handlers. > > > I really need more SC_* bits for my poc branch, but we're all out of them > even if I reclaim the two that are unused, and I didn't feel like making > dedicated signals (I know, I preached that), so I thought I would instead > give us some extra bits, because the songChanged mechanism is so > convenient to use. > > Give it a try and let me know what you think. Was I too hasty? > Maybe expect a few hiccups... > But I could remove it if it causes too much trouble. > > Cheers Tim. >
Introducing: More bits for Song Changed SC_* flags: Awright, I took the tedious time to rewrite this and do it properly. No dual flags. Instead, a single 64-bit wide flag. Added MusECore::SongChangedFlags_t (in new type_defs.h file). Declared as int64 type. (Maybe we'll need qlonglong or something else, whatever - it's super easy to change now.) All songChanged handlers, parameters, connections, calls, collateral operations etc. now use this new SongChangedFlags_t. All songChanged handlers are now ready for the code bodies to accept these extra flags. Devs need not do anything more than define new SC_* flags and write support inside the handlers. Please beware these possible extra flags when writing songChanged handlers and setting updateFlags. So go nuts. Now we have 31 more SC bits to play with, and it can be increased simply later by altering the typedef. As I say, hopefully no, or just a few, hiccups. There were awkward moments. I will test on my 32-bit machine to make sure it works. (I hope Qt signal connection params allow int64 on a 32-bit machine.) Comments? Suggestions? Is this a good thing (TM)? Cheers. Tim. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Lmuse-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lmuse-developer
