当前位置: 首页>>代码示例>>C++>>正文


C++ PObject::manTerm方法代码示例

本文整理汇总了C++中PObject::manTerm方法的典型用法代码示例。如果您正苦于以下问题:C++ PObject::manTerm方法的具体用法?C++ PObject::manTerm怎么用?C++ PObject::manTerm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PObject的用法示例。


在下文中一共展示了PObject::manTerm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: closefd

void PukeController::closefd(int fd) 
{
  if(bClosing == TRUE)
    return;
  bClosing = TRUE;
  if(qidConnectFd[fd] == NULL){
    kdDebug(5008) << "PukeController: Connect table NULL, closed twice?" << endl;
    return;
  }
  // Shutof the listener before closing the socket, just in case.
  qidConnectFd[fd]->sr->setEnabled(FALSE); // Shut them off
  qidConnectFd[fd]->sw->setEnabled(FALSE);
  delete qidConnectFd[fd]->sr;
  delete qidConnectFd[fd]->sw;
  qidConnectFd[fd]->server.truncate(0);
  qidConnectFd.remove(fd);
  close(fd);

  /*
   * Now let's remove all traces of the widgets
   */
  QIntDict<WidgetS> *qidWS = WidgetList[fd];
  if(qidWS == 0){
    kdDebug(5008) << "WidgetRunner:: Close called twice?" << endl;
    bClosing = FALSE;
    return;
  }

  qidWS->remove(PUKE_CONTROLLER);

  do {

    QIntDictIterator<WidgetS> it(*qidWS);
    if(it.count() == 0){
      kdDebug(5008) << "WidgetRunner: nothing left to delete\n" << endl;
      break;
    }

    PObject *po = 0x0;
    while(it.current()){
      /*
       * Delete all the layouts first
       *
       */
      if(it.current()->type == POBJECT_LAYOUT){
        po = it.current()->pwidget;
        break;
      }
      ++it;
    }

    if(po != 0x0){
      po->manTerm();
      delete po;
      continue;
    }

    /*
     * reset
     */
    it.toFirst();
    po = it.current()->pwidget;
    po->manTerm();
    delete po;


  } while (qidWS->count() > 0);

  WidgetList.remove(fd);
  bClosing = FALSE;
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:71,代码来源:controller.cpp


注:本文中的PObject::manTerm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。