summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 14:52:20 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 14:52:20 -0500
commit7cc3a975d2b1ac2d9efa6abef037533fc8bfec7c (patch)
tree120c23353382e666c8b034944c04f7cd29c7c7e3 /tdecore
parent1f3ee12a9a3fc09f69f45201c857a02b7abb127c (diff)
downloadtdelibs-7cc3a975d2b1ac2d9efa6abef037533fc8bfec7c.tar.gz
tdelibs-7cc3a975d2b1ac2d9efa6abef037533fc8bfec7c.zip
Allow session manager to be disable on creation when argc and argv are not passed to TDEApplication
This relates to Bug 760
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdeapplication.cpp27
-rw-r--r--tdecore/tdeapplication.h7
2 files changed, 34 insertions, 0 deletions
diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp
index 9a5bd7a0b..34bd8aadd 100644
--- a/tdecore/tdeapplication.cpp
+++ b/tdecore/tdeapplication.cpp
@@ -750,6 +750,33 @@ TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppNam
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
+TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenabled ) :
+// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
+ TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled, SMenabled ), // We need to be able to run command line apps
+ TDEInstance( TDECmdLineArgs::about),
+#ifdef Q_WS_X11
+ display(0L),
+ argb_visual(false),
+#endif
+ d (new TDEApplicationPrivate)
+{
+ 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!
TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) :
// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
diff --git a/tdecore/tdeapplication.h b/tdecore/tdeapplication.h
index 089f9f940..c22e9edbb 100644
--- a/tdecore/tdeapplication.h
+++ b/tdecore/tdeapplication.h
@@ -128,7 +128,14 @@ public:
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
+ TDEApplication( bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true);
+
+#ifdef TDEAPPLICATION_BINARY_COMPAT_HACK
+ // FIXME
+ // FOR BINARY COMPATIBILITY ONLY
+ // REMOVE WHEN PRACTICAL!
TDEApplication( bool allowStyles=true, bool GUIenabled=true);
+#endif // TDEAPPLICATION_BINARY_COMPAT_HACK
#ifdef Q_WS_X11
/**