From b1057f437bf65300831a0ccb45b920787c6b318d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 06:00:15 +0000 Subject: TQt4 port kdemultimedia This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun/library/pref.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'noatun/library/pref.cpp') diff --git a/noatun/library/pref.cpp b/noatun/library/pref.cpp index 658e7951..04e301ff 100644 --- a/noatun/library/pref.cpp +++ b/noatun/library/pref.cpp @@ -8,9 +8,9 @@ //#include #include "cmodule.h" -NoatunPreferences::NoatunPreferences(TQWidget *parent) +NoatunPreferences::NoatunPreferences(TQWidget *tqparent) : KDialogBase(TreeList, i18n("Preferences - Noatun"), - Ok|Apply|Cancel|Help, Ok, parent, "NoatunPreferences", false, true) + Ok|Apply|Cancel|Help, Ok, tqparent, "NoatunPreferences", false, true) { resize(640, 480); // KDE is required to support 800x600 min. setShowIconsInTreeList(true); @@ -32,7 +32,7 @@ void NoatunPreferences::show() void NoatunPreferences::show(CModule *page) { - int index = pageIndex( static_cast(page->parent()) ); + int index = pageIndex( static_cast(TQT_TQWIDGET(page->tqparent())) ); if (index != -1) showPage(index); show(); @@ -65,29 +65,20 @@ CModule::CModule(const TQString &name, const TQString &description, const TQStri napp->preferencesBox()->add(this); - TQFrame *page=static_cast(parent()); + TQFrame *page=static_cast(TQT_TQWIDGET(tqparent())); (new TQHBoxLayout(page))->addWidget(this); } CModule::~CModule() { //kdDebug(66666) << k_funcinfo << endl; -#if QT_VERSION < 0x030102 && KDE_VERSION < KDE_MAKE_VERSION( 3, 1, 90 ) - // Due to a bug in Qt 3.1 and 3.1.1 no close events are sent to hidden - // widgets, causing the KJanusWidget to crash. This workaround is - // rather intrusive and should be used only in the affected versions - // to avoid hard to track bugs in the future. KDE HEAD (to become 3.2) - // has a workaround for this problem, and additionally it's fixed in - // Qt 3.1.2. - napp->sendPostedEvents(); -#endif napp->preferencesBox()->remove(this); } void CModule::ownerDeleted() { - TQObject *p=parent(); + TQObject *p=tqparent(); delete this; p->deleteLater(); } -- cgit v1.2.1