summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-15 15:08:13 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-15 15:08:13 -0600
commitd1ade2755a25b9453853ee6050f8d7f4dcb2ba6a (patch)
treec77fe111ba72c005d4df1b0f32ab38ee7de10673
parent59b12c59d7ccb1d887d85bedcb3fc5c2949c412b (diff)
downloadtqtinterface-d1ade2755a25b9453853ee6050f8d7f4dcb2ba6a.tar.gz
tqtinterface-d1ade2755a25b9453853ee6050f8d7f4dcb2ba6a.zip
Fix kdelibs FTBFS on native TQt3
-rwxr-xr-xqtinterface/tqt-replace-tqt3.cmake2
-rw-r--r--qtinterface/tqt.h.cmake83
2 files changed, 72 insertions, 13 deletions
diff --git a/qtinterface/tqt-replace-tqt3.cmake b/qtinterface/tqt-replace-tqt3.cmake
index df9703b..194d5ac 100755
--- a/qtinterface/tqt-replace-tqt3.cmake
+++ b/qtinterface/tqt-replace-tqt3.cmake
@@ -4,5 +4,7 @@ QT_VERSION=@QT_VERSION@
if [[ $1 == "" ]]; then
echo "Usage: tqt-replace <input_file>"
else
+ sed -i 's/Q_SLOTS>/slots>/g' "$1"
+ sed -i 's/Q_SIGNALS>/signals>/g' "$1"
exit 0
fi
diff --git a/qtinterface/tqt.h.cmake b/qtinterface/tqt.h.cmake
index a1d5e00..b97167b 100644
--- a/qtinterface/tqt.h.cmake
+++ b/qtinterface/tqt.h.cmake
@@ -60,6 +60,10 @@ Boston, MA 02110-1301, USA.
#define TQ_OBJECT /* UNUSED */
+#ifdef TQT_REAL_TQT
+#define Qt TQt
+#endif
+
#define TQ_INLINE_TEMPLATES Q_INLINE_TEMPLATES
#define TQ_DUMMY_COMPARISON_OPERATOR Q_DUMMY_COMPARISON_OPERATOR
#define TQ_OVERRIDE Q_OVERRIDE
@@ -88,21 +92,39 @@ Boston, MA 02110-1301, USA.
#define qint64 long
#define quint64 unsigned long
+#ifndef TQT_REAL_TQT
+
+#define TQ_StrongFocus QWidget::StrongFocus
+#define TQ_NoFocus QWidget::NoFocus
+#define TQ_WheelFocus QWidget::WheelFocus
+#define TQ_ClickFocus QWidget::ClickFocus
+#define TQ_TabFocus QWidget::TabFocus
+#define TQ_FocusPolicy QWidget::FocusPolicy
+#define TQ_ScaleFree QImage::ScaleFree
+#define TQ_ScaleMin QImage::ScaleMin
+#define TQ_ScaleMax QImage::ScaleMax
+#define TQ_ScaleMode QImage::ScaleMode
+
+#else
+
+#define TQ_StrongFocus TQWidget::StrongFocus
+#define TQ_NoFocus TQWidget::NoFocus
+#define TQ_WheelFocus TQWidget::WheelFocus
+#define TQ_ClickFocus TQWidget::ClickFocus
+#define TQ_TabFocus TQWidget::TabFocus
+#define TQ_FocusPolicy TQWidget::FocusPolicy
+#define TQ_ScaleFree TQImage::ScaleFree
+#define TQ_ScaleMin TQImage::ScaleMin
+#define TQ_ScaleMax TQImage::ScaleMax
+#define TQ_ScaleMode TQImage::ScaleMode
+
+#endif
+
#define TQ_PrimitiveElement PrimitiveElement
#define TQ_StyleHint StyleHint
-#define TQ_StrongFocus QWidget::StrongFocus
-#define TQ_NoFocus QWidget::NoFocus
-#define TQ_WheelFocus QWidget::WheelFocus
-#define TQ_ClickFocus QWidget::ClickFocus
-#define TQ_TabFocus QWidget::TabFocus
-#define TQ_FocusPolicy QWidget::FocusPolicy
#define TQ_Horizontal Horizontal
#define TQ_Vertical Vertical
#define TQ_Alignment Qt::AlignmentFlags
-#define TQ_ScaleFree QImage::ScaleFree
-#define TQ_ScaleMin QImage::ScaleMin
-#define TQ_ScaleMax QImage::ScaleMax
-#define TQ_ScaleMode QImage::ScaleMode
#define TQ_Key_Shift Key_Shift
#define TQ_Key_Control Key_Control
#define TQ_Key_Alt Key_Alt
@@ -783,6 +805,7 @@ Boston, MA 02110-1301, USA.
#define TQTextStream QTextStream
#define TQTextIStream QTextIStream
#define TQTextOStream QTextOStream
+#define TQTLWExtra QTLWExtra
#define TQTSManip QTSManip
#define TQTextView QTextView
#define TQThread QThread
@@ -856,6 +879,22 @@ Boston, MA 02110-1301, USA.
#define TQXmlDefaultHandler QXmlDefaultHandler
#define TQUnknownInterface QUnknownInterface
+#else
+
+#ifndef TQT_NO_COMPAT_NAMES
+
+#define QObject TQObject
+#define QWidget TQWidget
+#define QImage TQImage
+#define QPair TQPair
+#define QRgb TQRgb
+#define QColor TQColor
+#define QChar TQChar
+#define QString TQString
+#define QIODevice TQIODevice
+
+#endif
+
#endif
#define tqRound qRound
@@ -1042,16 +1081,24 @@ Boston, MA 02110-1301, USA.
#define tqsizeFromContents sizeFromContents
#define tqdrawComplexControlMask drawComplexControlMask
+#define TQ_SETS Q_SETS
+#define TQ_PROPERTY Q_PROPERTY
+
#ifndef TQT_REAL_TQT
#define TQCOORD QCOORD
#define TQCOORD_MAX QCOORD_MAX
-#define TQ_SETS Q_SETS
-#define TQ_PROPERTY Q_PROPERTY
+
#define TQMIN QMIN
#define TQMAX QMAX
#define TQABS QABS
+#else
+
+#define QMIN TQMIN
+#define QMAX TQMAX
+#define QABS TQABS
+
#endif
#define tqMakePair qMakePair
@@ -1065,8 +1112,18 @@ Boston, MA 02110-1301, USA.
#ifndef TQT_REAL_TQT
#define TQUObject QUObject
+
+#define static_TQUType_int static_QUType_int
+#define static_TQUType_TQString static_QUType_QString
+#define static_TQUType_ptr static_QUType_ptr
+#define static_TQUType_bool static_QUType_bool
+#define static_TQUType_varptr static_QUType_varptr
+#define static_TQUType_charstar static_QUType_charstar
+
+#else
+
#define static_TQUType_int static_QUType_int
-#define static_TQUType_TQString static_QUType_QString
+#define static_TQUType_TQString static_QUType_TQString
#define static_TQUType_ptr static_QUType_ptr
#define static_TQUType_bool static_QUType_bool
#define static_TQUType_varptr static_QUType_varptr