mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
generic: enable session management for most applications
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
865ddb65a8
commit
c3f3bff65e
6 changed files with 6 additions and 0 deletions
|
@ -115,6 +115,7 @@ int main(int argc, char **argv)
|
|||
|
||||
KApplication application;
|
||||
application.setQuitOnLastWindowClosed(false);
|
||||
application.enableSessionManagement();
|
||||
|
||||
//session restoring
|
||||
if (application.isSessionRestored()) {
|
||||
|
|
|
@ -61,6 +61,7 @@ int main(int argc, char *argv[])
|
|||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
if (!app.isSessionRestored()) {
|
||||
MainWindow *mw = new MainWindow();
|
||||
|
|
|
@ -126,6 +126,7 @@ int main(int argc, char *argv[])
|
|||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
// startHelper must live for the whole life of the application
|
||||
StartHelper startHelper;
|
||||
|
|
|
@ -34,6 +34,7 @@ int main(int argc, char** argv)
|
|||
aboutData.setProgramIconName(QLatin1String("applications-engineering"));
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
KUniqueApplication *kemuapp = new KUniqueApplication();
|
||||
kemuapp->enableSessionManagement();
|
||||
KEmuMainWindow *kemuwindow = new KEmuMainWindow();
|
||||
kemuwindow->show();
|
||||
return kemuapp->exec();
|
||||
|
|
|
@ -52,6 +52,7 @@ int main(int argc, char **argv)
|
|||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
// Create top level window
|
||||
KSnapshot *toplevel;
|
||||
|
|
|
@ -45,6 +45,7 @@ int main(int argc, char** argv)
|
|||
options.add("+[URL]", ki18n("Document to open. Specify '-' to read from stdin."));
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
KApplication app;
|
||||
app.enableSessionManagement();
|
||||
|
||||
// see if we are starting with session management
|
||||
if (app.isSessionRestored())
|
||||
|
|
Loading…
Add table
Reference in a new issue