rem: KStartupInfo::appStarted(); mMainWin->hide(); } else { if ( mMainWin ) { mMainWin->show(); KWin::activateWindow( mMainWin->winId() ); KStartupInfo::appStarted(); } else { mMainWin = new KAddressBookMain; mMainWin->show();
add: setMainWidget( mMainWin );
context: int KAddressBookApp::newInstance(){  if ( isRestored() ) {    // There can only be one main window    if ( KMainWindow::canBeRestored( 1 ) ) {      mMainWin = new KAddressBookMain;      mMainWin->show();      mMainWin->restore( 1 );    }  } else {    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();    if ( args->isSet( "editor-only" ) ) {      if ( !mMainWin )        mMainWin = new KAddressBookMain;        KStartupInfo::appStarted();        mMainWin->hide();    } else {      if ( mMainWin ) {        mMainWin->show();        KWin::activateWindow( mMainWin->winId() );        KStartupInfo::appStarted();      } else {        mMainWin = new KAddressBookMain;        mMainWin->show();      }    }    mMainWin->handleCommandLine();  }  return 0;}