[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [patch] KRec
From: Arnold Krille <kde () arnoldarts ! de>
Date: 2002-09-01 19:07:35
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
today I received a patch from Stefan Asserhäll which should fix the
shutdown-hang (didn't work for me). It also does some little fixes...
Could anyone test (and commit) it?
Perhaps you could also try if the shutdown-bug. (Could be that is only my
setup where this is a problem...)
If you can fix it, don't forget to add yourself to the thanks-to...
Arnold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9cmV3r3oYC7XCTmIRAqsrAKCneR9fwcnWincU9gocdBlxJiPNZQCgnXmm
a/CaUt4zAyVoCCaI/9e4gBs=
=37VM
-----END PGP SIGNATURE-----
["krec.diff" (text/x-diff)]
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdemultimedia/krec/Makefile.am,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile.am
--- Makefile.am 2002/08/26 14:51:59 1.7
+++ Makefile.am 2002/09/01 18:56:46
@@ -29,7 +29,10 @@ desktopdir = $(kde_appsdir)/Multimedia
desktop_DATA = krec.desktop
messages: rc.cpp
+ rm -f tips.cpp
+ $(PREPARETIPS) > tips.cpp
$(XGETTEXT) *.cpp *.h -o $(podir)/krec.pot
+ rm -f tips.cpp
KDE_ICON = krec
Index: krecord.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/krec/krecord.cpp,v
retrieving revision 1.14
diff -u -p -r1.14 krecord.cpp
--- krecord.cpp 2002/09/01 15:24:22 1.14
+++ krecord.cpp 2002/09/01 18:56:47
@@ -123,10 +123,13 @@ kdDebug()<<"KRecord::KRecord() Actions"<
# warning TODO(for all ;-): Fix shutdown problem
#endif
// Try enabling the first line and disabling the second ;-)
- // KRec then won't quit properly (also activate the Start/End lines in main.cpp).
+ // KRec then won't quit properly. It will hang after the the mainwindow is deleted. \
Seems like some QObjects still alive or so... // I don't know why this is that way \
but perhaps you can tell me. + // PS: Stefan Asserhäll send me a patch wich should \
solve the problem but it doesn't. + // I applied it also, since it had some other \
advantages.. + // PSS: Could be that his patch works except for my setup... Could \
someone test it? //
- // =/\= Arnold Krille=/\=
+ // =/\= Arnold Krille =/\=
//
//(void*) KStdAction::quit( this, SLOT(close()), actionCollection() );
(void*) KStdAction::quit( kapp, SLOT(quit()), actionCollection() );
@@ -164,7 +167,8 @@ kdDebug()<<"KRecord::KRecord() ToolBar::
if( b_comp )
{
- aw = factory.createGui( comp );
+ Arts::GenericGuiFactory factory;
+ Arts::Widget aw = factory.createGui( comp );
w = new KArtsWidget( aw, toolBar("compressor") );
w->setName( "kde toolbar widget" );
@@ -187,17 +191,31 @@ kdDebug()<<"KRecord::KRecord() ToolBar::
KRecord::~KRecord(){
kdDebug()<<"KRecord::~KRecord()"<<endl; // (DEBUG)
- delete w;
+ if( b_comp ) delete w;
vutimer->stop();
stopRec();
aman_play.stop();
effects.remove( vc_id );
- effects.remove( comp_id );
- effects.stop();
+ if( b_comp ) effects.remove( comp_id );
+ //effects.stop(); /// The effectrack is stopped when the m_recStream gets deleted.
volumecontrol.stop();
if( b_comp ) comp.stop();
bs2a.stop();
- sender.streamEnd();
+ //sender.stop(); /// The sender shouldn't be running...
+
+ aman_play = Arts::Synth_AMAN_PLAY::null();
+ effects = Arts::StereoEffectStack::null();
+ volumecontrol = Arts::StereoVolumeControl::null();
+ if( b_comp ) comp = Arts::Synth_STEREO_COMPRESSOR::null();
+ bs2a = Arts::ByteStreamToAudio::null();
+ sender = Arts::ByteSoundProducerV2::null();
+
+ /// this doesn't need to be deleted since they have KMainWindow as parent and get \
deleted by QObject, I think. + //m_recStream->stop();
+ //delete m_recStream;
+ //delete server;
+ //delete dispatcher;
+ //delete w;
kdDebug()<<"~KRecord() - Bye"<<endl;
}
@@ -269,7 +287,7 @@ void KRecord::checkActions(){
actionCollection()->action("play_play")->setEnabled(true);
}
-void KRecord::showContextMenu (KListView* list, QListViewItem* item, const QPoint& \
qpoint){ +void KRecord::showContextMenu (KListView*, QListViewItem* item, const \
QPoint& qpoint){ if( ! item )
return;
switch( item->rtti() )
Index: krecord.h
===================================================================
RCS file: /home/kde/kdemultimedia/krec/krecord.h,v
retrieving revision 1.5
diff -u -p -r1.5 krecord.h
--- krecord.h 2002/09/01 15:24:22 1.5
+++ krecord.h 2002/09/01 18:56:47
@@ -117,8 +117,6 @@ private:
Arts::StereoEffectStack effects;
Arts::StereoVolumeControl volumecontrol;
Arts::Synth_STEREO_COMPRESSOR comp;
- Arts::GenericGuiFactory factory;
- Arts::Widget aw;
KArtsWidget *w;
Arts::ByteStreamToAudio bs2a;
Arts::ByteSoundProducerV2 sender;
Index: main.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/krec/main.cpp,v
retrieving revision 1.6
diff -u -p -r1.6 main.cpp
--- main.cpp 2002/08/17 16:32:53 1.6
+++ main.cpp 2002/09/01 18:56:47
@@ -52,6 +52,7 @@ int main( int argc, char* argv[] )
"(c) 2002, Arnold Krille" );
aboutData.addAuthor("Arnold Krille", I18N_NOOP( "Creator \nLook at the website \
www.arnoldarts.de \nfor other good stuff." ), "arnold@arnoldarts.de"); \
aboutData.addCredit( "Matthias Kretz", I18N_NOOP( "Helped where he was asked" ), \
"kretz@kde.org" ); + aboutData.addCredit( "Stefan Asserhaell", I18N_NOOP( "Did some \
minor improvements" ) ); KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
Index: recordfile.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/krec/recordfile.cpp,v
retrieving revision 1.14
diff -u -p -r1.14 recordfile.cpp
--- recordfile.cpp 2002/08/26 14:51:59 1.14
+++ recordfile.cpp 2002/09/01 18:56:47
@@ -65,7 +65,7 @@ kdDebug()<<"RecordFile("<<_filename<<"):
i_menu->insert( a_rec );
a_play = new KAction( i18n("Play File"), "player_play", KShortcut(), this, \
SLOT(playFile()), this, "playrecordfile" ); i_menu->insert( a_play );
- a_delete = new KAction( i18n("Close File"), "file_close", KShortcut(), this, \
SLOT(deleteSelf()), this, "closerecordfile" ); + a_delete = new KAction( i18n("Close \
File"), "fileclose", KShortcut(), this, SLOT(deleteLater()), this, "closerecordfile" \
); i_menu->popupMenu()->insertSeparator();
i_menu->insert( a_delete );
}
Index: recordfile.h
===================================================================
RCS file: /home/kde/kdemultimedia/krec/recordfile.h,v
retrieving revision 1.4
diff -u -p -r1.4 recordfile.h
--- recordfile.h 2002/08/26 14:51:59 1.4
+++ recordfile.h 2002/09/01 18:56:47
@@ -83,8 +83,6 @@ public slots:
void openFilePlay();
/// Closes the file.
void closeFile( bool signal=false);
- /// Closes the file completely.
- void deleteSelf() { delete this; }
/**
* receives data to write to the file
Index: session.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/krec/session.cpp,v
retrieving revision 1.8
diff -u -p -r1.8 session.cpp
--- session.cpp 2002/08/28 15:01:06 1.8
+++ session.cpp 2002/09/01 18:56:48
@@ -48,13 +48,12 @@ void Session::init( QString npre ){
i_menu->insert( a_open );
a_newFile = new KAction( i18n("New File"), "filenew", KShortcut(), this, \
SLOT(newFile()), this, ""); i_menu->insert( a_newFile );
- a_closeSession = new KAction( i18n("Close Session"), "fileclose", KShortcut(), \
this, SLOT(deleteself()), this, "closesession" ); + a_closeSession = new KAction( \
i18n("Close Session"), "fileclose", KShortcut(), this, SLOT(deleteLater()), this, \
"closesession" ); i_menu->insert( a_closeSession );
}
Session::~Session(){
//kdDebug()<<"Session::~Session()"<<endl; // (DEBUG)
- delete pix;
delete folder_open;
delete folder_closed;
}
Index: session.h
===================================================================
RCS file: /home/kde/kdemultimedia/krec/session.h,v
retrieving revision 1.2
diff -u -p -r1.2 session.h
--- session.h 2002/08/17 16:32:53 1.2
+++ session.h 2002/09/01 18:56:48
@@ -66,8 +66,6 @@ public slots:
void setOpen( bool open );
/// Returns the Contextmenu.
KActionMenu* menu() { return i_menu; }
- /// Deletes the object.
- void deleteself() { delete this; }
protected slots:
/// Creates a new file.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic