[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdemultimedia/noatun/library
From: Stefan Gehn <sgehn () gmx ! net>
Date: 2004-06-12 21:10:13
Message-ID: 20040612211013.4C7A8126CD () office ! kde ! org
[Download RAW message or body]
CVS commit by metz:
less code duplication; port old fix from kopete to noatun
M +17 -15 pref.cpp 1.7
--- kdemultimedia/noatun/library/pref.cpp #1.6:1.7
@@ -4,5 +4,5 @@
#include <kglobal.h>
#include <kiconloader.h>
-//#include <kdebug.h>
+#include <kdebug.h>
#include <qlayout.h>
#include <qlabel.h>
@@ -33,11 +33,8 @@ void NoatunPreferences::show()
void NoatunPreferences::show(CModule *page)
{
- for (CModule *i=mModules.first(); i != 0; i=mModules.next())
- i->reopen();
int index = pageIndex( static_cast<QWidget *>(page->parent()) );
-// kdDebug(66666) << k_funcinfo << "index=" << index << endl;
if (index != -1)
showPage(index);
- KDialogBase::show();
+ show();
}
@@ -60,14 +56,12 @@ void NoatunPreferences::remove(CModule *
CModule::CModule(const QString &name, const QString &description, const QString \
&icon, QObject *owner)
- : QWidget(napp->preferencesBox()->addPage(name,
- description,
- \
KGlobal::iconLoader()->loadIcon(icon,
- \
KIcon::Small,
- 0, \
KIcon::DefaultState,
- 0, \
true))) + : QWidget(napp->preferencesBox()->addPage(name, description, \
KGlobal::iconLoader()->loadIcon( + icon, KIcon::Small,0, \
KIcon::DefaultState,0, true))) {
if (owner)
connect(owner, SIGNAL(destroyed()), SLOT(ownerDeleted()));
+ kdDebug(66666) << k_funcinfo << "name = " << name << endl;
+
napp->preferencesBox()->add(this);
@@ -78,7 +72,15 @@ CModule::CModule(const QString &name, co
CModule::~CModule()
{
- // TODO When kdialogbase is fixed, delete the parent QFrame, and
- // all traces of the related page
+ 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);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic