Advertisement
Guest User

portsnapprogress.cpp

a guest
Dec 27th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. /****************************************************************************
  2. ** ui.h extension file, included from the uic-generated form implementation.
  3. **
  4. ** If you want to add, delete, or rename functions or slots, use
  5. ** Qt Designer to update this file, preserving your code.
  6. **
  7. ** You should not define a constructor or destructor in this file.
  8. ** Instead, write your code in functions called init() and destroy().
  9. ** These will automatically be called by the form's constructor and
  10. ** destructor.
  11. *****************************************************************************/
  12. #include "portsnapprogress.h"
  13. #include <qtextstream.h>
  14. #include <QProcess>
  15. #include <QDebug>
  16. #include <QDir>
  17.  
  18. void PortsnapProc::init(bool ports, QString pcVer)
  19. {
  20. longProcess = new PortsnapProc;
  21. connect(longProcess, SIGNAL(ProcMessage(QString)), this, SLOT(UpdateProcessDisplay(QString)) );
  22. connect(longProcess, SIGNAL(procFinished(bool)), this, SLOT(ProcessFinished(bool)) );
  23. if( longProcess->isRunning() ){
  24. qDebug() << "Ports are already being modified, try again after it finishes";
  25. return;
  26. }
  27. if( longProcess->startInitPorts() ){ qDebug() << "Ports init started successfully"; }
  28. else{ qDebug() << "Ports init could not be started"; }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement