void ZooArch::remove( QStringList *list ) { if (!list) return; KProcess *kp = m_currentProcess = new KProcess; kp->clearArguments(); *kp << m_archiver_program << "D" << m_filename; QStringList::Iterator it; for ( it = list->begin(); it != list->end(); ++it ) { QString str = *it; *kp << str; } connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ), SLOT( slotReceivedOutput(KProcess*, char*, int) ) ); connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ), SLOT( slotReceivedOutput(KProcess*, char*, int) ) ); connect( kp, SIGNAL( processExited(KProcess*) ), SLOT( slotDeleteExited(KProcess*) ) ); if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); emit sigDelete( false ); } }
//========================================= // Member call for handleNotificationEvent //----------------------------------------- bool Notify::sendSignal (int fd,int flag) { sigprocmask(SIG_BLOCK, &block_set,0); if ( mNotifyDirs[fd] ) { QString* pFolder = mNotifyDirs[fd]; QPoint* count = mNotifyCount[fd]; QStringList tokens = pFolder->split ( "/" ); QString folder = tokens.first(); QString dirname = tokens.last(); switch (flag) { case QBIFF_CREATE: printf ("________create %s %p\n",pFolder->toLatin1().data(),count); if (dirname == "new") { count -> rx()++; } else { count -> ry()++; } sigCreate ( &folder,count ); break; case QBIFF_DELETE: printf ("________delete %s %p\n",pFolder->toLatin1().data(),count); if (dirname == "new") { count -> rx()--; } else { count -> ry()--; } sigDelete ( &folder,count ); break; default: break; } sigNotify ( &folder,count ); sigprocmask(SIG_UNBLOCK, &block_set,0); return true; } sigprocmask(SIG_UNBLOCK, &block_set,0); return false; }