Bug#33851: destructors of Toplevelwidgets of KDevelop creted Applications are not called on exit

o.dreyer at mwi-online.de o.dreyer at mwi-online.de
Thu Oct 18 09:35:16 UTC 2001


Package: kdevelop
Version: 2.0.1 (using KDE 2.2.1 )
Severity: normal
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:                Linux (i686) release 2.4.7-4GB
OS/Compiler notes: 

In the main-function of a wizard-generated application, you can find the line

return a.exec();

This means:
After leaving the main loop of the app, the program will return directly  and calls not the destructor of the toplevel widget.

Please change this similar like this:

int main(int argc, char *argv[])
{
  int ret;

  KAboutData aboutData( "kvncserver", I18N_NOOP("KVNCServer"),
    VERSION, description, KAboutData::License_GPL,
    "(c) 2001, Olaf Dreyer", 0, 0, "o.dreyer at mwi-online.de");
  aboutData.addAuthor("Olaf Dreyer",0, "o.dreyer at mwi-online.de");
  KCmdLineArgs::init( argc, argv, &aboutData );
  KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.

  KApplication a;
  KVNCServer *kvncserver = new KVNCServer();
  a.setMainWidget(kvncserver);

  ret = a.exec();

  delete kvncserver;

  return ret;
}


(Submitted via bugs.kde.org)
(Called from KBugReport dialog)


-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list