View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007768 | Scribus | Qt4 Port | public | 2009-01-31 18:39 | 2009-02-09 17:49 |
Reporter | bero | Assigned To | jghali | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | any | OS | Linux | OS Version | Ark Linux 2009.1 |
Product Version | 1.3.5svn | ||||
Target Version | 1.3.5 | Fixed in Version | 1.3.5svn | ||
Summary | 0007768: scribus Qt4 fails to compile with current Qt 4.5 snapshots | ||||
Description | The Qt4 port fails to compile with recent Qt 4.5 snapshots because storing pointers in QVariants is now illegal: /usr/lib/qt4/include/QtCore/qvariant.h: In member function 'void MassObservable<OBSERVED>::updateNow(UpdateMemento*) [with OBSERVED = StyleContext*]': /usr/src/ark/BUILD/scribus/scribus/styles/style.cpp:89: instantiated from here /usr/lib/qt4/include/QtCore/qvariant.h:411: error: 'QVariant::QVariant(void*)' is private /usr/src/ark/BUILD/scribus/scribus/observable.h:251: error: within this context make[2]: *** [scribus/styles/CMakeFiles/scribus_styles_lib.dir/style.o] Error 1 make[1]: *** [scribus/styles/CMakeFiles/scribus_styles_lib.dir/all] Error 2 | ||||
Steps To Reproduce | 1. Install a current Qt 4.5 snapshot 2. Try to compile scribus | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
yup we are aware of the issue with Qt 4.5 snapshots from Suse as well. I am sure this will be resolved before 1.3.5 is final. |
2009-02-08 20:49
|
qt45_build_fix.patch (2,204 bytes)
Index: scribus/observable.h =================================================================== --- scribus/observable.h (revision 13169) +++ scribus/observable.h (working copy) @@ -248,7 +248,7 @@ { obs->changed(memento->m_data); } - changedSignal->emitSignal(memento->m_data); + changedSignal->emitSignal(QVariant::fromValue(memento->m_data)); delete memento; } @@ -280,17 +280,17 @@ template<class OBSERVED> inline bool MassObservable<OBSERVED>::connectObserver(QObject* o, const char* slot) { - OBSERVED dummy; + typename OBSERVED dummy; Private_Init(dummy); - return changedSignal->connectSignal(dummy, o, slot); + return changedSignal->connectSignal(QVariant::fromValue(dummy), o, slot); } template<class OBSERVED> inline bool MassObservable<OBSERVED>::disconnectObserver(QObject* o, const char* slot) { - OBSERVED dummy; + typename OBSERVED dummy; Private_Init(dummy); - return changedSignal->disconnectSignal(dummy, o, slot); + return changedSignal->disconnectSignal(QVariant::fromValue(dummy), o, slot); } Index: scribus/page.h =================================================================== --- scribus/page.h (revision 13169) +++ scribus/page.h (working copy) @@ -110,4 +110,6 @@ QString m_pageSectionNumber; }; +Q_DECLARE_METATYPE(Page*); + #endif Index: scribus/pageitem.h =================================================================== --- scribus/pageitem.h (revision 13169) +++ scribus/pageitem.h (working copy) @@ -1315,4 +1315,6 @@ void imageOffsetScale(double, double, double, double); }; +Q_DECLARE_METATYPE(PageItem*); + #endif Index: scribus/scribusdoc.h =================================================================== --- scribus/scribusdoc.h (revision 13169) +++ scribus/scribusdoc.h (working copy) @@ -1200,4 +1200,6 @@ void removePict(QString name); }; +Q_DECLARE_METATYPE(ScribusDoc*); + #endif Index: scribus/styles/stylecontext.h =================================================================== --- scribus/styles/stylecontext.h (revision 13169) +++ scribus/styles/stylecontext.h (working copy) @@ -77,4 +77,6 @@ mutable int m_cnt; }; +Q_DECLARE_METATYPE(StyleContext*); + #endif |
|
I've uploaded a patch which allows building scribus with qt 4.5 rc1. I would be grateful if anyone could test before i commit. |
|
Current svn+the attached patch still doesn't compile here, but now it fails with a new error: [ 1%] Building CXX object scribus/styles/CMakeFiles/scribus_styles_lib.dir/style.o In file included from /usr/src/ark/BUILD/scribus/scribus/styles/../styles/stylecontext.h:24, from /usr/src/ark/BUILD/scribus/scribus/styles/../style.h:25, from /usr/src/ark/BUILD/scribus/scribus/styles/style.h:6, from /usr/src/ark/BUILD/scribus/scribus/styles/style.cpp:18: /usr/src/ark/BUILD/scribus/scribus/observable.h: In member function 'bool MassObservable<OBSERVED>::connectObserver(QObject*, const char*)': /usr/src/ark/BUILD/scribus/scribus/observable.h:283: error: expected initializer before 'dummy' /usr/src/ark/BUILD/scribus/scribus/observable.h:284: error: 'dummy' was not declared in this scope /usr/src/ark/BUILD/scribus/scribus/observable.h: In member function 'bool MassObservable<OBSERVED>::disconnectObserver(QObject*, const char*)': /usr/src/ark/BUILD/scribus/scribus/observable.h:291: error: expected initializer before 'dummy' /usr/src/ark/BUILD/scribus/scribus/observable.h:292: error: 'dummy' was not declared in this scope |
|
It works if I remove the addition of "typename" from the OBSERVED dummy; declarations from the patch |
2009-02-08 22:08
|
scribus-qt-4.5.patch (2,124 bytes)
Index: scribus/observable.h =================================================================== --- scribus/observable.h (revision 13169) +++ scribus/observable.h (working copy) @@ -248,7 +248,7 @@ { obs->changed(memento->m_data); } - changedSignal->emitSignal(memento->m_data); + changedSignal->emitSignal(QVariant::fromValue(memento->m_data)); delete memento; } @@ -280,17 +280,17 @@ template<class OBSERVED> inline bool MassObservable<OBSERVED>::connectObserver(QObject* o, const char* slot) { OBSERVED dummy; Private_Init(dummy); - return changedSignal->connectSignal(dummy, o, slot); + return changedSignal->connectSignal(QVariant::fromValue(dummy), o, slot); } template<class OBSERVED> inline bool MassObservable<OBSERVED>::disconnectObserver(QObject* o, const char* slot) { OBSERVED dummy; Private_Init(dummy); - return changedSignal->disconnectSignal(dummy, o, slot); + return changedSignal->disconnectSignal(QVariant::fromValue(dummy), o, slot); } Index: scribus/page.h =================================================================== --- scribus/page.h (revision 13169) +++ scribus/page.h (working copy) @@ -110,4 +110,6 @@ QString m_pageSectionNumber; }; +Q_DECLARE_METATYPE(Page*); + #endif Index: scribus/pageitem.h =================================================================== --- scribus/pageitem.h (revision 13169) +++ scribus/pageitem.h (working copy) @@ -1315,4 +1315,6 @@ void imageOffsetScale(double, double, double, double); }; +Q_DECLARE_METATYPE(PageItem*); + #endif Index: scribus/scribusdoc.h =================================================================== --- scribus/scribusdoc.h (revision 13169) +++ scribus/scribusdoc.h (working copy) @@ -1200,4 +1200,6 @@ void removePict(QString name); }; +Q_DECLARE_METATYPE(ScribusDoc*); + #endif Index: scribus/styles/stylecontext.h =================================================================== --- scribus/styles/stylecontext.h (revision 13169) +++ scribus/styles/stylecontext.h (working copy) @@ -77,4 +77,6 @@ mutable int m_cnt; }; +Q_DECLARE_METATYPE(StyleContext*); + #endif |
|
I've attached the version I've modified to work here. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-01-31 18:39 | bero | New Issue | |
2009-01-31 20:58 |
|
Note Added: 0021058 | |
2009-01-31 20:58 |
|
Status | new => acknowledged |
2009-01-31 20:59 |
|
Target Version | => 1.3.5svn |
2009-02-01 00:05 | jghali | Target Version | 1.3.5svn => 1.3.5 |
2009-02-08 20:49 | jghali | File Added: qt45_build_fix.patch | |
2009-02-08 20:51 | jghali | Note Added: 0021085 | |
2009-02-08 22:06 | bero | Note Added: 0021088 | |
2009-02-08 22:08 | bero | Note Added: 0021089 | |
2009-02-08 22:08 | bero | File Added: scribus-qt-4.5.patch | |
2009-02-08 22:09 | bero | Note Added: 0021090 | |
2009-02-08 23:26 | jghali | Status | acknowledged => assigned |
2009-02-08 23:26 | jghali | Assigned To | => jghali |
2009-02-08 23:27 | jghali | Status | assigned => resolved |
2009-02-08 23:27 | jghali | Fixed in Version | => 1.3.5svn |
2009-02-08 23:27 | jghali | Resolution | open => fixed |
2009-02-09 17:49 | cbradney | Status | resolved => closed |