diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-08-08 14:52:20 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-24 02:20:20 +0100 |
commit | f05253b5e0474417234fa808f729f201c4600934 (patch) | |
tree | 960b2a84f69f78102710ed47cc77098b4439e22e | |
parent | 83e71b4192b232fa5c3e17cc729ea8c94425cba5 (diff) | |
download | tdelibs-f05253b5e0474417234fa808f729f201c4600934.tar.gz tdelibs-f05253b5e0474417234fa808f729f201c4600934.zip |
Allow session manager to be disable on creation when argc and argv are not passed to TDEApplication
This relates to Bug 760
(cherry picked from commit 7cc3a975d2b1ac2d9efa6abef037533fc8bfec7c)
-rw-r--r-- | kdecore/kapplication.cpp | 27 | ||||
-rw-r--r-- | kdecore/kapplication.h | 7 |
2 files changed, 34 insertions, 0 deletions
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp index b5aa8bc80..1ca402e4a 100644 --- a/kdecore/kapplication.cpp +++ b/kdecore/kapplication.cpp @@ -679,6 +679,33 @@ KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName, d->m_KAppDCOPInterface = new KAppDCOPInterface(this); } +KApplication::KApplication( bool allowStyles, bool GUIenabled, bool SMenabled ) : +// TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), TRUE ), // Qt4 requires that there always be a GUI + TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), GUIenabled, SMenabled ), // We need to be able to run command line apps + KInstance( KCmdLineArgs::about), +#ifdef Q_WS_X11 + display(0L), + argb_visual(false), +#endif + d (new KApplicationPrivate) +{ + aIconPixmap.pm.icon = 0L; + aIconPixmap.pm.miniIcon = 0L; + read_app_startup_id(); + if (!GUIenabled) + allowStyles = false; + useStyles = allowStyles; + setName( instanceName() ); + + installSigpipeHandler(); + parseCommandLine( ); + init(GUIenabled); + d->m_KAppDCOPInterface = new KAppDCOPInterface(this); +} + +// FIXME +// FOR BINARY COMPATIBILITY ONLY +// REMOVE WHEN PRACTICAL! KApplication::KApplication( bool allowStyles, bool GUIenabled ) : // TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), TRUE ), // Qt4 requires that there always be a GUI TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(), GUIenabled ), // We need to be able to run command line apps diff --git a/kdecore/kapplication.h b/kdecore/kapplication.h index 25c527abc..f2e121879 100644 --- a/kdecore/kapplication.h +++ b/kdecore/kapplication.h @@ -128,7 +128,14 @@ public: * @param GUIenabled Set to false to disable all GUI stuff. This implies * no styles either. */ + KApplication( bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true); + +#ifdef TDEAPPLICATION_BINARY_COMPAT_HACK + // FIXME + // FOR BINARY COMPATIBILITY ONLY + // REMOVE WHEN PRACTICAL! KApplication( bool allowStyles=true, bool GUIenabled=true); +#endif // TDEAPPLICATION_BINARY_COMPAT_HACK #ifdef Q_WS_X11 /** |