From 3011e3f1741057b9163c3658a8847c528da5da05 Mon Sep 17 00:00:00 2001 From: drw Date: Tue, 22 Mar 2005 22:57:07 +0000 Subject: Disconnect signals after command executes to prevent bug where messages show up multiple times in install dialog --- diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index 417ee95..127204d 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp @@ -443,6 +443,7 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶me case OPackage::Update : { connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); ipkg_lists_update( &m_ipkgArgs ); + disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); }; break; case OPackage::Upgrade : { @@ -459,6 +460,7 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶me linkPackageDir( dest->name() ); } delete destList; + disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); }; break; case OPackage::Install : { @@ -469,6 +471,7 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶me } if ( destination != "root" ) linkPackageDir( destination ); + disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); }; break; case OPackage::Remove : { @@ -484,6 +487,7 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶me } delete destList; + disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); }; break; case OPackage::Download : { @@ -492,16 +496,19 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶me { ipkg_packages_download( &m_ipkgArgs, (*it) ); } + disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); }; break; case OPackage::Info : { connect( this, SIGNAL(signalIpkgStatus(const QString &)), receiver, slotOutput ); ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l ); + disconnect( this, SIGNAL(signalIpkgStatus(const QString &)), 0, 0 ); }; break; case OPackage::Files : { connect( this, SIGNAL(signalIpkgList(const QString &)), receiver, slotOutput ); ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l ); + disconnect( this, SIGNAL(signalIpkgList(const QString &)), 0, 0 ); }; break; default : break; -- cgit v0.9.0.2