Looking in Adept code to find how to fix the bad window

Paul Dufresne dufresnep at fastmail.fm
Sat Jun 30 19:32:00 UTC 2007


On Sat, 30 Jun 2007 14:22:52 -0400, "Paul Dufresne"
<dufresnep at fastmail.fm> said:
> I am not sure this is THE window I talk about (maybe there is more than
> one like this?)
Indeed, there are more than one (about one by adept binary).

Ok here I find that in
/home/paul/adept-2.1.2ubuntu27/adept/updater/app.cpp we have:
void TestApp::commit() {
    kdDebug() << "TestApp::commit" << endl;
    disableButtons();
    setHistoryEnabled( false );
    if (m_list->searchView()->lister()->busy()) {
        new WaitForLister( this, SLOT( commit() ) );
        return;
    }

    aptFront::Manager m;
    m.setProgressCallback( m_progress->callback() );
    m.setUpdateInterval( 100000 );
    try {
        m_stack->raiseWidget( m_progress );
        m.download();
        m_stack->raiseWidget( m_commitProgress );
        m.commit();
    } catch ( exception::OperationCancelled ) {
    } catch ( ... ) {
        KMessageBox::sorry(
            this, i18n( "There was an error commiting changes. "
                        "Possibly there was a problem downloading some "
                        "packages or the commit would break packages. "
                        ),
            i18n( "Could not commit changes" ) );
    }

    m_stack->raiseWidget( m_bye );
    disableNext();
[new version stuff deleted]
#endif
    m_quit->setText( i18n( "Quit" ) );
    m_quit->setEnabled( true );
    notifyPostChange( 0 );
}

where m is from:
 aptFront::Manager m; 
In what file this aptFront::Manager defined?
I suspect m.commit() to make a new thread that continue to run while
runing KMessageBox::Sorry.
Guess that just after KMessageBox::Sorry, we should wait for that
hypothetical thread to complete?

BTW I don't know much about C++ and QT.

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html





More information about the kubuntu-users mailing list