diff options
author | Timothy Pearson <[email protected]> | 2014-10-05 15:59:23 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-10-05 15:59:23 -0500 |
commit | 7cd4adc908abf8c5e3b391c4a88f0514ba8468c4 (patch) | |
tree | 59f4f1c7a50f5701c442aed0c69ecb9249b09076 /tdeui/tdemainwindow.cpp | |
parent | 67d3c303f3ba902ebc8337d683cc184340d5db32 (diff) | |
download | tdelibs-7cd4adc908abf8c5e3b391c4a88f0514ba8468c4.tar.gz tdelibs-7cd4adc908abf8c5e3b391c4a88f0514ba8468c4.zip |
Add proper refcounting option to TDEMainWindow
This relates to the discussion at:
http://lists.kde.org/?l=kde-core-devel&m=107208785431497&w=2
Clean up a few minor code formatting issues
Diffstat (limited to 'tdeui/tdemainwindow.cpp')
-rw-r--r-- | tdeui/tdemainwindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tdeui/tdemainwindow.cpp b/tdeui/tdemainwindow.cpp index 51d873bd0..225b910e4 100644 --- a/tdeui/tdemainwindow.cpp +++ b/tdeui/tdemainwindow.cpp @@ -66,6 +66,7 @@ public: bool autoSaveWindowSize:1; bool care_about_geometry:1; bool shuttingDown:1; + bool newStyleRefCounting:1; TQString autoSaveGroup; TDEAccel * tdeaccel; TDEMainWindowInterface *m_interface; @@ -245,7 +246,7 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) d->shuttingDown = false; if ((d->care_about_geometry = being_first)) { being_first = false; - if ( kapp->geometryArgument().isNull() ) // if there is no geometry, it doesn't mater + if ( kapp->geometryArgument().isNull() ) // if there is no geometry, it doesn't matter d->care_about_geometry = false; else parseGeometry(false); @@ -257,6 +258,14 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) else d->m_interface = new TDEMainWindowInterface(this); + if ( cflags & NewRefCountMode ) { + d->newStyleRefCounting = true; + kapp->ref(); + } + else { + d->newStyleRefCounting = false; + } + if (!kapp->authorize("movable_toolbars")) setDockWindowsMovable(false); } |