rpms/SoQt/devel qt4-fixes.patch,NONE,1.1 SoQt.spec,1.30,1.31
corsepiu
corsepiu at fedoraproject.org
Wed Jul 29 11:04:16 UTC 2009
- Previous message (by thread): rpms/gnuradio/F-11 gnuradio.spec,1.13,1.14 sources,1.5,1.6
- Next message (by thread): rpms/mailody/devel import.log, NONE, 1.1 mailody.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: corsepiu
Update of /cvs/pkgs/rpms/SoQt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24433
Modified Files:
SoQt.spec
Added Files:
qt4-fixes.patch
Log Message:
* Wed Jul 29 2009 Ralf Corsépius <corsepiu at fedoraproject.org> - 1.4.1-12
- Switch to qt4.
qt4-fixes.patch:
SoQt.cpp | 5 +++--
widgets/QtNativePopupMenu.cpp | 33 ++++++++++++++++++++++++++-------
2 files changed, 29 insertions(+), 9 deletions(-)
--- NEW FILE qt4-fixes.patch ---
--- cvs.orig/src/Inventor/Qt/SoQt.cpp
+++ cvs/src/Inventor/Qt/SoQt.cpp
@@ -622,7 +622,7 @@
// spaceball devices.)
class SoQtApplication : public QApplication {
public:
- SoQtApplication(int argc, char ** argv) : QApplication(argc, argv) {
+ SoQtApplication(int & argc, char ** argv) : QApplication(argc, argv) {
#ifdef HAVE_X11_AVAILABLE
this->display = NULL;
#endif // HAVE_X11_AVAILABLE
@@ -719,7 +719,8 @@
// use a static char array to store the dummy argv parameters
static char * dummyargv[1];
dummyargv[0] = "SoQt";
- SoQtP::appobject = new SoQtApplication(1, (char **) dummyargv);
+ int argc = 1;
+ SoQtP::appobject = new SoQtApplication(argc, (char **) dummyargv);
SoQtP::madeappobject = TRUE;
}
else {
--- cvs.orig/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp
+++ cvs/src/Inventor/Qt/widgets/QtNativePopupMenu.cpp
@@ -33,6 +33,9 @@
// wrt Qt 4 properly. 20050629 mortene.
#define QT3_SUPPORT
+// FIXME: create a new Qt4NativePopupMenu. There are just too
+// many differences between Qt3 menu handling and Qt4 menu handling.
+
#include <qmetaobject.h>
// *************************************************************************
@@ -121,6 +124,10 @@
delete [] rec->title;
delete rec;
}
+
+ delete this->menus;
+ delete this->items;
+
} // ~QtNativePopupMenu()
// *************************************************************************
@@ -328,11 +335,14 @@
rec->flags |= ITEM_MARKED;
else
rec->flags &= ~ITEM_MARKED;
+
if (rec->parent != NULL) {
-#if QT_VERSION >= 0x040000 // Qt 4.*
+#if QT_VERSION >= 0x040000
// FIXME: is this really safe? (20050727 frodo)
QAction * action = (QAction *) rec->parent->findItem(itemid);
- if (action) action->setChecked(marked ? true : false);
+ if (action) {
+ action->setChecked(marked ? true : false);
+ }
#else
rec->parent->setItemChecked(rec->itemid, marked ? true : false);
#endif
@@ -350,6 +360,11 @@
assert(rec && "no such menu");
if (rec->parent == NULL)
return (rec->flags & ITEM_MARKED) ? TRUE : FALSE;
+
+#if QT_VERSION >= 0x040400
+ QAction * action = (QAction *) rec->parent->findItem(itemid);
+ if (action) return action->isChecked();
+#endif
return rec->parent->isItemChecked(rec->itemid) ? TRUE : FALSE;
} // getMenuItemMarked()
@@ -373,10 +388,14 @@
// itemActivation(). Multiple calls to itemActivation() causes a
// segfault when selecting Quadbuffer stereo, at least when it's not
// supported. (20050726 frodo)
-#if QT_VERSION >= 0x040000 // Qt 4.*
+
+ // this was changed/fixed again in Qt 4.4.0, so now we shouldn't
+ // disconnect menu items if this version is detected...
+ // (20070530 pederb)
+#if (QT_VERSION >= 0x040000) && (QT_VERSION < 0x040400)
QObject::disconnect(sub->menu, SIGNAL(activated(int)),
this, SLOT(itemActivation(int)));
-#endif
+#endif // QT-version >= 400 && QT-version < 4.4.0
if (pos == -1)
super->menu->insertItem(QString(sub->title), sub->menu, sub->menuid);
@@ -405,14 +424,14 @@
menu->menu->insertItem(QString(item->title), item->itemid, pos);
item->parent = menu->menu;
-#if QT_VERSION >= 0x040000 // Qt 4.*
+#if QT_VERSION >= 0x040000
// FIXME: is this really safe? (20050726 frodo)
QAction * action = (QAction *) item->parent->findItem(itemid);
if (action) action->setCheckable(true);
#endif // Qt 4.*
if (item->flags & ITEM_MARKED) {
-#if QT_VERSION >= 0x040000 // Qt 4.*
+#if QT_VERSION >= 0x040000
if (action) action->setChecked(true);
#else
item->parent->setItemChecked(item->itemid, true);
@@ -554,7 +573,7 @@
rec->name = strcpy(new char [strlen(name)+1], name);
rec->title = strcpy(new char [strlen(name)+1], name);
-#if QT_VERSION >= 0x040000 // Qt 4.*
+#if QT_VERSION >= 0x040000
rec->menu = new QPOPUPMENU_CLASS(QString(name));
#else
rec->menu = new QPOPUPMENU_CLASS((QWidget *) NULL, name);
Index: SoQt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/SoQt/devel/SoQt.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- SoQt.spec 24 Jul 2009 16:23:52 -0000 1.30
+++ SoQt.spec 29 Jul 2009 11:04:15 -0000 1.31
@@ -4,7 +4,7 @@
Summary: High-level 3D visualization library
Name: SoQt
Version: 1.4.1
-Release: 11%{?dist}
+Release: 12%{?dist}
License: GPLv2
Group: System Environment/Libraries
@@ -12,11 +12,14 @@ URL: http://www.coin3d.org
Source: ftp://ftp.coin3d.org/pub/coin/src/SoQt-%{version}.tar.gz
-Patch2: SoQt-1.2.0-man3.diff
+Patch0: SoQt-1.2.0-man3.diff
+# Debian soqt4 patch
+Patch1: http://patch-tracking.debian.net/patch/series/dl/soqt/1.4.1-6/qt4-fixes.patch
BuildRequires: doxygen
BuildRequires: /usr/bin/iconv
-BuildRequires: Coin2-devel qt3-devel
+BuildRequires: Coin2-devel
+BuildRequires: qt4-devel
BuildRequires: libXi-devel
Provides: Coin2-SoQt = %{version}-%{release}
@@ -35,7 +38,9 @@ InventorXt GUI component toolkit.
Summary: Development files for SoQt
Requires: %{name} = %{version}-%{release}
Requires: %{_datadir}/aclocal
-Requires: Coin2-devel qt3-devel
+Requires: Coin2-devel
+Requires: qt4-devel
+
Requires: libXi-devel
Provides: Coin2-SoQt-devel = %{version}-%{release}
Group: Development/Libraries
@@ -45,7 +50,8 @@ Development package for SoQt
%prep
%setup -q
-%patch2 -p1
+%patch0 -p1
+%patch1 -p1
# HACK ALERT
# The sources are ISO-8859-1 encoded
@@ -55,14 +61,15 @@ sed -i \
src/Inventor/Qt/common/sogui.doxygen.in
%build
-[ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
%configure \
--includedir=%{coin_includedir} \
--without-mesa \
--disable-dependency-tracking \
--enable-man \
--enable-html \
- htmldir=%{coin_htmldir}/SoQt
+ --with-qt=%{_libdir}/qt4 \
+ htmldir=%{coin_htmldir}/SoQt \
+ CPPFLAGS="${CPPFLAGS} -I%{_includedir}/Qt"
make
# Strip the default libdir
@@ -105,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man?/*.?.gz
%changelog
+* Wed Jul 29 2009 Ralf Corsépius <corsepiu at fedoraproject.org> - 1.4.1-12
+- Switch to qt4.
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
- Previous message (by thread): rpms/gnuradio/F-11 gnuradio.spec,1.13,1.14 sources,1.5,1.6
- Next message (by thread): rpms/mailody/devel import.log, NONE, 1.1 mailody.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list