From ea4f2e7b0dfe72eebd4dfb33930d40029acd5798 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 8 Jun 2005 04:29:47 +0000 Subject: [PATCH] Porting to Mandrake 10.1 and new products: porting to the qt 3.3.3: patch for this qt is useless, thus do not use it: redefine "P" by "" --- src/PatchQt/Makefile.in | 11 +++-------- src/PatchQt/qactionP.cxx | 6 ++++++ src/PatchQt/qactionP.h | 20 +++++++++++++------- src/PatchQt/qfiledialogP.cxx | 6 ++++++ src/PatchQt/qfiledialogP.h | 18 ++++++++++++------ src/PatchQt/qsplitterP.cxx | 8 +++++++- src/PatchQt/qsplitterP.h | 13 +++++++++++++ src/PatchQt/qworkspaceP.cxx | 5 +++++ src/PatchQt/qworkspaceP.h | 22 ++++++++++++++++------ 9 files changed, 81 insertions(+), 28 deletions(-) diff --git a/src/PatchQt/Makefile.in b/src/PatchQt/Makefile.in index 7909f104a..48769299c 100644 --- a/src/PatchQt/Makefile.in +++ b/src/PatchQt/Makefile.in @@ -38,18 +38,13 @@ EXPORT_HEADERS = \ qfiledialogP.h # Libraries targets -ifeq ($(QT_VERS),v3_3_3) - LIB_SRC = qsplitterP.cxx qsplitterP_moc.cxx -else - LIB_SRC = qsplitterP.cxx qsplitterP_moc.cxx qworkspaceP.cxx qworkspaceP_moc.cxx qactionP.cxx qactionP_moc.cxx qfiledialogP.cxx qfiledialogP_moc.cxx -endif LIB = libqsplitterP.la - +LIB_SRC = qsplitterP.cxx qworkspaceP.cxx qactionP.cxx qfiledialogP.cxx qsplitterP_moc.cxx: $(inc_builddir)/qsplitterP.h $(MOC) $(inc_builddir)/qsplitterP.h -o qsplitterP_moc.cxx -qworkspaceP_moc.cxx: $(inc_builddir)/qworkspaceP.h +qworkspaceP_moc.cxx: $(inc_builddir)/qworkspaceP.h $(MOC) $(inc_builddir)/qworkspaceP.h -o qworkspaceP_moc.cxx qactionP_moc.cxx: $(inc_builddir)/qactionP.h @@ -58,7 +53,7 @@ qactionP_moc.cxx: $(inc_builddir)/qactionP.h qfiledialogP_moc.cxx: $(inc_builddir)/qfiledialogP.h $(MOC) $(inc_builddir)/qfiledialogP.h -o qfiledialogP_moc.cxx -CPPFLAGS+=$(QT_INCLUDES) -I${QTDIR}/src/kernel -I$(QTDIR)/mkspecs/linux-g++ -I/usr/share/qt3/mkspecs/linux-g++ +CPPFLAGS+=$(QT_INCLUDES) -I${QTDIR}/src/kernel -I$(QTDIR)/mkspecs/linux-g++ CXXFLAGS+= LDFLAGS+=$(QT_MT_LIBS) diff --git a/src/PatchQt/qactionP.cxx b/src/PatchQt/qactionP.cxx index 0d1269dac..75aaa4c15 100644 --- a/src/PatchQt/qactionP.cxx +++ b/src/PatchQt/qactionP.cxx @@ -43,6 +43,10 @@ #include "qactionP.h" +#if (QT_VERSION < 0x030303) + +#include "qactionP_moc.cxx" + #ifndef QT_NO_ACTION #include @@ -1778,3 +1782,5 @@ void QActionPGroup::addedTo( int index, QPopupMenu *menu ) } #endif + +#endif diff --git a/src/PatchQt/qactionP.h b/src/PatchQt/qactionP.h index 160324087..6853982c9 100644 --- a/src/PatchQt/qactionP.h +++ b/src/PatchQt/qactionP.h @@ -44,6 +44,18 @@ #ifndef QACTIONP_H #define QACTIONP_H +#include +#if (QT_VERSION >= 0x030303) + +// mpv: do not use patches for qt version >= 3.3.3 +#include +#define QActionPPrivate QActionPrivate +#define QActionPGroupPrivate QActionGroupPrivate +#define QActionPGroup QActionGroup +#define QActionP QAction + +#else + #ifndef QT_H #include #include @@ -53,12 +65,6 @@ #ifndef QT_NO_ACTION -#if QT_VERSION > 0x030005 -#include -#define QActionP QAction -#define QActionPGroup QActionGroup -#else - class QActionPPrivate; class QActionPGroupPrivate; class QStatusBar; @@ -190,6 +196,6 @@ public: #endif -#endif // QT_VERSION +#endif #endif diff --git a/src/PatchQt/qfiledialogP.cxx b/src/PatchQt/qfiledialogP.cxx index 0b3ca637b..e6aa9dbba 100644 --- a/src/PatchQt/qfiledialogP.cxx +++ b/src/PatchQt/qfiledialogP.cxx @@ -50,6 +50,10 @@ #include "qfiledialogP.h" +#if (QT_VERSION < 0x030303) + +#include "qfiledialogP_moc.cxx" + #ifndef QT_NO_FILEDIALOG #include "qlineedit.h" @@ -5976,3 +5980,5 @@ QFilePreviewP::QFilePreviewP() */ #endif + +#endif diff --git a/src/PatchQt/qfiledialogP.h b/src/PatchQt/qfiledialogP.h index ab615b753..9cf6ee7fb 100644 --- a/src/PatchQt/qfiledialogP.h +++ b/src/PatchQt/qfiledialogP.h @@ -44,6 +44,17 @@ #ifndef QFILEDIALOGP_H #define QFILEDIALOGP_H +#include +#if (QT_VERSION >= 0x030303) + +#include +// mpv: do not use patches for qt version >= 3.3.3 +#define QFileIconProviderP QFileIconProvider +#define QFilePreviewP QFilePreview +#define QFileDialogP QFileDialog + +#else + class QPushButton; class QButton; class QLabel; @@ -68,11 +79,6 @@ class QFileDialogQFileListView; #include "qlineedit.h" #endif // QT_H -#if QT_VERSION > 0x030005 -#include -#define QFileDialogP QFileDialog -#else - #ifndef QT_NO_FILEDIALOG class Q_EXPORT QFileIconProviderP : public QObject @@ -530,6 +536,6 @@ private: #endif -#endif // QT_VERSION +#endif #endif // QFILEDIALOG_H diff --git a/src/PatchQt/qsplitterP.cxx b/src/PatchQt/qsplitterP.cxx index 15d5ed2aa..85a1b5017 100644 --- a/src/PatchQt/qsplitterP.cxx +++ b/src/PatchQt/qsplitterP.cxx @@ -42,13 +42,17 @@ **********************************************************************/ #include "qsplitterP.h" + +#if (QT_VERSION < 0x030303) + +#include "qsplitterP_moc.cxx" + #ifndef QT_NO_COMPLEXWIDGETS #include #include #include #include -#include #include #if QT_VERSION < 300 #include @@ -1402,3 +1406,5 @@ void QSplitterP::updateSplitterHandles() const { s = data->list.next(); } } + +#endif diff --git a/src/PatchQt/qsplitterP.h b/src/PatchQt/qsplitterP.h index 263a90429..da94e7e40 100644 --- a/src/PatchQt/qsplitterP.h +++ b/src/PatchQt/qsplitterP.h @@ -43,6 +43,18 @@ #ifndef QSPLITTERP_H #define QSPLITTERP_H +#include +#if (QT_VERSION >= 0x030303) + +#include +// mpv: do not use patches for qt version >= 3.3.3 +#define QSplitterPHandle QSplitterHandle +#define QSplitterPData QSplitterData +#define QSplitterPLayoutStruct QSplitterLayoutStruct +#define QSplitterP QSplitter + +#else + #ifndef QT_H #include #include @@ -211,5 +223,6 @@ private: QPushButton* unright; }; +#endif #endif // QSPLITTERP_H diff --git a/src/PatchQt/qworkspaceP.cxx b/src/PatchQt/qworkspaceP.cxx index 1a959ae47..558c545fa 100644 --- a/src/PatchQt/qworkspaceP.cxx +++ b/src/PatchQt/qworkspaceP.cxx @@ -43,6 +43,10 @@ #include "qworkspaceP.h" +#if (QT_VERSION < 0x030303) + +#include "qworkspaceP_moc.cxx" + #include #include #include @@ -3402,3 +3406,4 @@ QSize QTitleBarP::sizeHint() const return QSize( menur.width(), style().pixelMetric( QStyle::PM_TitleBarHeight, this ) ); } +#endif diff --git a/src/PatchQt/qworkspaceP.h b/src/PatchQt/qworkspaceP.h index 2197da251..0ce92b6f0 100644 --- a/src/PatchQt/qworkspaceP.h +++ b/src/PatchQt/qworkspaceP.h @@ -44,6 +44,20 @@ #ifndef QWORKSPACEP_H #define QWORKSPACEP_H +#include +#if (QT_VERSION >= 0x030303) + +#include +// mpv: do not use patches for qt version >= 3.3.3 +#define QWorkspacePChild QWorkspaceChild +#define QWorkspacePPrivate QWorkspacePrivate +#define QWidgetResizeHandlerP QWidgetResizeHandler +#define QTitleBarP QTitleBar +#define QWorkspaceP QWorkspace +#define QTitleBarPPrivate QTitleBarPrivate + +#else + #ifndef QT_H #include #include @@ -54,11 +68,6 @@ #include #endif // QT_H -#if QT_VERSION > 0x030005 -#include -#define QWorkspaceP QWorkspace -#else - class QWorkspacePChild; class QShowEvent; class QWorkspacePPrivate; @@ -355,5 +364,6 @@ private: QTitleBarPPrivate *d; }; -#endif // QT_VERSION +#endif + #endif // QWORKSPACEP_H -- 2.39.2