Comments (11)
Namespaces.
from spine-runtimes.
It's not SlotData that is the problem it is the variable name slots in the class definition?
Maybe I misunderstand what your saying. Sorry
from spine-runtimes.
Oh right, so it's not a scope thing?
from spine-runtimes.
No its not.
It's used like this.
class bla{
public:
int hi;
private:
int bye;
public slots:
void setValue(int value);
signals:
void valueChanged(int newValue);
}
so the words slots and signals are reserved and we cant use them as a variable name in a class.
from spine-runtimes.
Note this only affects headers, as C files should not be fed to QT moc. Still, it's bloody annoying.
from spine-runtimes.
What version of QT are you using? QT 4+ has QT_NO_KEYWORDS, then you use Q_SIGNALS and Q_SLOTS instead of signals and slots in your programs. Is this acceptable? Slots are called slots in Spine, I'm not keen on changing the names in Spine code.
For a QT 3 and below workaround, we could undef slots, described here:
http://lists.trolltech.com/qt-interest/2008-01/thread00347-0.html
I'd rather keep QT specific stuff out of Spine code. You could surround all Spine header #includes in your code with the undef.
from spine-runtimes.
I'm using QT 5.0.2.
I'm building libspine separate and then when its a static library trying to link it into my cocos/qt project.
So yes its only when we include the headers in qt and is quite annoying.
I didn't even know qt3 was still supported.
Don't think anyone uses that anymore and I'd agree completely on keeping qt specific code out of spine.
I have no problem using QT_NO_KEYWORDS.
I'll test it there now and see if it works.
Thanks for the reply :)
I'll be back asap
from spine-runtimes.
It works but I must use Q_FOREACH instead of foreach also.
Do you want to make a wiki page on this for others?
from spine-runtimes.
Glad that works! I will document use with QT when I write docs for the C runtime.
from spine-runtimes.
👍 Thanks dude
from spine-runtimes.
I tried to use ECL (a common lisp) and the reserved keyword slots
spoils the whole idea I had:
In ecls object.h
struct ecl_instance { /* instance header */
_ECL_HDR1(isgf);
cl_index length; /* instance length */
cl_object clas; /* instance class */
cl_objectfn entry; /* entry address */
cl_object sig; /* generation signature */
cl_object *slots; /* instance slots */
};
So what again is an easy way to work around this?
from spine-runtimes.
Related Issues (20)
- [ts][pixi] Support for Pixi 8.x HOT 2
- [unity] SkeletonRenderSeparator mesh broken with slot alpha 0 HOT 2
- [unity] `URP/2D/Skeleton Lit` shader incorrectly displays Additive slots HOT 1
- [defold] Update plugin
- [unity] SkeletonRenderTexture not displaying on Vulkan HOT 1
- [player] Unify asset location config
- [UE] Crash when callbacks called HOT 1
- [unity] Physics inheritance ignored transform rotation
- [ts][pixi] Adding a child Pixi object in a Slot that follows its transform HOT 23
- [unity] BlendModeMaterials badly supported in runtime instantiation from files
- [unity] RenderExistingMesh causing unnecessary allocation
- [unity] SkeletonDataAsset with 0 atlas assets throws confusing exception in build
- Port: Improved clipping stability for colinear points.
- Port: Added TrackEntry#isNextReady().
- [ts][phaser] Bug on build with webpack "You may need an appropriate loader to handle this file type." HOT 2
- [ts][pixi] Spine Tint Black alpha not working HOT 4
- [c][cpp] Inherit transform timelines not working as intended
- [unity] Incorrect display of additive blend mode with slot alpha in Linear color space HOT 2
- Can not build spine_flutter in release HOT 3
- [godot] v4.2.2 runtime rendering issues (PRO) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-runtimes.