Advertisement
Guest User

Untitled

a guest
May 5th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void MainWindow::loadParticionesACopiar()
  2. {
  3.     QProcess p;
  4.     // comando lista particiones
  5.     p.start("cat /proc/mounts |grep -v loop |grep \"/mnt\" |grep -v \"/mnt/live\" |grep -v \"/mnt/_\" |grep -v \"/mnt/cdrom_\" |cut -d \" \" -f 2 |grep -v \"/proc\"");
  6.     if (!p.waitForFinished(5000)) {
  7.         this->ui->statusBar->showMessage("ERROR: IMPOSIBLE ENCONTRAR PARTICIONES PARA COPIAR");
  8.         return;
  9.     }
  10.  
  11.     // cargando particiones
  12.     QString line = p.readLine();
  13.     while (!line.isEmpty()) {
  14.         this->ui->comboBoxParticionACopiar->addItem(line);
  15.         line = p.readLine();
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement