Help with this error no such signal
Unsolved
General and Desktop
-
Hi i am trying to connect this signal with this slot:
connect(manager,SIGNAL(finished(QXmppTransferJob*) ),this,SLOT(transferenciaCompleta(QXmppTransferJob *)));
The code:
void MainWindow::transferenciaCompleta(QXmppTransferJob *transferencia) { if(transferencia->direction() == QXmppTransferJob::IncomingDirection) { if(transferencia->fileInfo().name() == "|@|captura|@|") { emit procesar(datos); } else { if(transferencia->fileInfo().name() == "|@|mini|@|") { QPixmap imagen; imagen.loadFromData(bufferMini.buffer()); ventana.labelMiniatura()->setPixmap(imagen); ventana.rutaArchivo = ""; ventana.barraProgresoTransferencia()->setValue(0); bufferMini.close(); } else { if(transferencia->fileInfo().name() == "|@|webcam|@|") { QPixmap imagen; imagen.loadFromData(bufferWebcam.buffer()); webcam.imagenWebcam()->setPixmap(imagen); if (webcam.guardarAutomaticamente()->isChecked()) { QString capGuarda; this->numCapturas++; capGuarda.setNum(this->numCapturas); QFile guardar; guardar.setFileName(capGuarda + ".jpg"); guardar.open(QFile::WriteOnly); guardar.write(bufferWebcam.buffer()); guardar.close(); } if(webcam.capturasAutomaticas()->isChecked()) { webcam.capturar(); } bufferWebcam.close(); } else { archivoRecibido->close(); delete archivoRecibido; } } } } }
Error:
QObject::connect: No such signal QXmppTransferManager::finished(QXmppTransferJob*) QObject::connect: (receiver name: 'MainWindow') QThread: Destroyed while thread is still running
Thanks in advance.
-
According to this documentation from internet the signal is called jobFinished
So changing to
connect(manager,SIGNAL(jobFinished(QXmppTransferJob*) ),this,SLOT(transferenciaCompleta(QXmppTransferJob *)));
should work, when I caught the recent documentation through Google.
PS: you are using a Qt based library, which is actually not part of Qt itself.
-
BTW: You can find such problems already at compile-time by using the new signals and slots syntax.