MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0005544 | VTK | (No Category) | public | 2007-08-20 17:26 | 2008-04-01 13:02 |
Reporter | alexiuk | ||||
Assigned To | Clinton Stimpson | ||||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Project | |||||
Type | |||||
Summary | 0005544: QVTKWidget uses QT keywords that interfere with Boost signals / slots | ||||
Description | Qt #defines three lower-case words to appear as an extension to C++: signals, slots, and emit. This interferes with other use of those terms, e.g. a method named emit() is not possible. Nor is an alternative implementation of signals and slots. The way around this is to #define QT_NO_KEYWORDS on the compiler invocation and change the code as follows: signals -> Q_SIGNALS slots -> Q_SLOTS emit foo() -> foo() Removing these keywords now allows us to use them as normal and leaves the door open for using the Boost implementation of signals & slots alongside Qt’s, should that prove useful. See http://www.scottcollins.net/articles/a-deeper-look-at-signals-and-slots.html [^] for a comparison. | ||||
Steps To Reproduce | |||||
Additional Information | The following is a diff of the changes: the_wild_kingdom>p4 diff -du QVTKWidget.h ==== //depot/src/vtk-5.0.3/GUISupport/Qt/QVTKWidget.h#1 - C:/perforce/misp-MAIN\import\src\vtk-5.0.3\GUISupport\Qt\QVTKWidget.h ==== @@ -137,7 +137,7 @@ virtual QPaintEngine* paintEngine() const; - signals: + Q_SIGNALS: // Description: // This signal will be emitted whenever a mouse event occurs // within the QVTK window @@ -153,7 +153,7 @@ void cachedImageClean(); - public slots: + public Q_SLOTS: // Description: // This will mark the cached image as dirty. This slot is automatically // invoked whenever the render window has a render event or the widget is @@ -230,7 +230,7 @@ static OSStatus DirtyRegionProcessor(EventHandlerCallRef er, EventRef event, void*); #endif - private slots: + private Q_SLOTS: void internalMacFixRect(); protected: @@ -277,7 +277,7 @@ // Overloaded destroy timer method for destroying Qt timers. virtual int DestroyTimer(); -public slots: +public Q_SLOTS: // timer event slot virtual void TimerEvent(); | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2007-08-20 17:26 | alexiuk | New Issue | |||
2008-01-28 14:57 | Clinton Stimpson | Status | backlog => tabled | ||
2008-01-28 14:57 | Clinton Stimpson | Assigned To | => Clinton Stimpson | ||
2008-01-28 15:21 | Clinton Stimpson | Note Added: 0010310 | |||
2008-04-01 11:36 | Maik Beckmann | Note Added: 0011016 | |||
2008-04-01 13:02 | Clinton Stimpson | Status | tabled => closed | ||
2008-04-01 13:02 | Clinton Stimpson | Note Added: 0011018 | |||
2008-04-01 13:02 | Clinton Stimpson | Resolution | open => fixed | ||
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|