mhogomchungu / media-downloader

Media Downloader is a Qt/C++ front end to yt-dlp, youtube-dl, gallery-dl, lux, you-get, svtplay-dl, aria2c, wget and safari books..
GNU General Public License v2.0
1.34k stars 101 forks source link

Logout cancelled by media-downloader (KDE Plasma) #386

Closed pvint closed 3 months ago

pvint commented 3 months ago

When restarting or shutting down KDE media-downloader is cancelling the process. It does close, but it is necessary to initiate the logout again to proceed.

Desktop 1_005

In mainwindow.cpp line 222 void QEvent::ignore() is called:

void MainWindow::closeEvent( QCloseEvent * e )
{
    e->ignore() ;

    this->hide() ;

    if( !m_showTrayIcon ){

        this->quitApp() ;
    }
}

Changing the e->ignore() to e->accept() seems to fix the problem without affecting anything, but perhaps I'm not understanding why ignore was used.

mhogomchungu commented 3 months ago

Thanks, i have experience this behavior but never looked into it, i have reworked the code and the problem should now be gone.

pvint commented 3 months ago

Perfect! Tested and it functions as expected. Thanks!