why deleting QProcess is crashing?
see my code :
{
...
m_pFindinFilesProcess = new QProcess(this);
connect(m_pFindinFilesProcess, SIGNAL(finished(int)), this, SLOT(onFindFileSearchFinished()));
connect(m_pFindinFilesProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadFindFileResult()));
m_pFindinFilesProcess->start("grep", processParam);
}
void MainWindow::onFindFileSearchFinished()
{
if(m_pFindinFilesProcess)
{
delete m_pFindinFilesProcess; --> Crashing here
m_pFindinFilesProcess = NULL;
}
}
{
...
m_pFindinFilesProcess = new QProcess(this);
connect(m_pFindinFilesProcess, SIGNAL(finished(int)), this, SLOT(onFindFileSearchFinished()));
connect(m_pFindinFilesProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadFindFileResult()));
m_pFindinFilesProcess->start("grep", processParam);
}
void MainWindow::onFindFileSearchFinished()
{
if(m_pFindinFilesProcess)
{
delete m_pFindinFilesProcess; --> Crashing here
m_pFindinFilesProcess = NULL;
}
}
To copy to clipboard, switch view to plain text mode
Must Watch:
See how we can connect digital world objects to our day to day life….
Bookmarks