Changeset 6eb31e1ae810d9be2c70a0eb265117806c9db882

Show
Ignore:
Timestamp:
02/10/08 11:46:02 (7 months ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1202640362 +0000
git-parent:

[0ba856895367653b71198c8b7b543f628c0ae236]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1202640362 +0000
Message:

Qt4 - Destroy correctly the qt4 interface when used in DP.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/qt4.cpp

    r0ba8568 r6eb31e1  
    249249    vlc_mutex_unlock( &p_intf->object_lock ); 
    250250 
    251     if( p_intf->pf_show_dialog ) 
    252     { 
     251    if( p_intf->p_sys->b_isDialogProvider ) 
     252    { 
     253        DialogEvent *event = new DialogEvent( INTF_DIALOG_EXIT, 0, NULL ); 
     254        QApplication::postEvent( THEDP, static_cast<QEvent*>(event) ); 
     255 
    253256        vlc_thread_join( p_intf ); 
    254257    } 
     
    310313        /* We don't show it because it is done in the MainInterface constructor 
    311314        p_mi->show(); */ 
     315        p_intf->p_sys->b_isDialogProvider = false; 
    312316    } 
    313317    else 
    314318    { 
    315319        vlc_thread_ready( p_intf ); 
     320        p_intf->p_sys->b_isDialogProvider = true; 
    316321    } 
    317322 
     
    343348 
    344349    /* Explain to the core how to show a dialog :D */ 
    345     //p_intf->pf_show_dialog = ShowDialog; 
     350    p_intf->pf_show_dialog = ShowDialog; 
    346351 
    347352    /* Last settings */ 
     
    358363        int interval = config_GetInt( p_intf, "qt-updates-days" ); 
    359364        QSettings settings( "vlc", "vlc-qt-interface" ); 
    360         if( QDate::currentDate() > settings.value( "updatedate" ).toDate().addDays( interval ) ) 
     365        if( QDate::currentDate() > 
     366                settings.value( "updatedate" ).toDate().addDays( interval ) ) 
    361367        { 
    362368            msg_Dbg( p_intf, "Someone said I need to check updates" ); 
     
    388394    config_PutPsz( p_intf, "qt-filedialog-path", p_intf->p_sys->psz_filepath ); 
    389395    free( psz_path ); 
    390  
    391396} 
    392397 
  • modules/gui/qt4/qt4.hpp

    r0ba8568 r6eb31e1  
    5656    QApplication *p_app; 
    5757    MainInterface *p_mi; 
     58 
     59    bool b_isDialogProvider; 
    5860 
    5961    playlist_t *p_playlist;