diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-05 15:59:23 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-05 15:59:23 -0500 |
commit | 7cd4adc908abf8c5e3b391c4a88f0514ba8468c4 (patch) | |
tree | 59f4f1c7a50f5701c442aed0c69ecb9249b09076 /tdeui | |
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')
-rw-r--r-- | tdeui/kguiitem.cpp | 4 | ||||
-rw-r--r-- | tdeui/kguiitem.h | 2 | ||||
-rw-r--r-- | tdeui/tdemainwindow.cpp | 11 | ||||
-rw-r--r-- | tdeui/tdemainwindow.h | 3 |
4 files changed, 16 insertions, 4 deletions
diff --git a/tdeui/kguiitem.cpp b/tdeui/kguiitem.cpp index dd30e1fe8..9d623bb39 100644 --- a/tdeui/kguiitem.cpp +++ b/tdeui/kguiitem.cpp @@ -155,7 +155,7 @@ TQIconSet KGuiItem::iconSet( TDEIcon::Group group, int size, TDEInstance* instan { if( !d->m_iconName.isEmpty()) { -// some caching here would(?) come handy + // some caching here would(?) come handy return instance->iconLoader()->loadIconSet( d->m_iconName, group, size, true, false ); } else @@ -164,7 +164,9 @@ TQIconSet KGuiItem::iconSet( TDEIcon::Group group, int size, TDEInstance* instan } } else + { return TQIconSet(); + } } TQString KGuiItem::iconName() const diff --git a/tdeui/kguiitem.h b/tdeui/kguiitem.h index 538275f3d..c2ab86746 100644 --- a/tdeui/kguiitem.h +++ b/tdeui/kguiitem.h @@ -46,7 +46,7 @@ public: // It gives the wrong impression that you just change the text. KGuiItem( const TQString &text, const TQString &iconName = TQString::null, - const TQString &toolTip = TQString::null, + const TQString &toolTip = TQString::null, const TQString &whatsThis = TQString::null ); KGuiItem( const TQString &text, const TQIconSet &iconSet, 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); } diff --git a/tdeui/tdemainwindow.h b/tdeui/tdemainwindow.h index f2898ab06..856590ab9 100644 --- a/tdeui/tdemainwindow.h +++ b/tdeui/tdemainwindow.h @@ -151,7 +151,8 @@ public: */ enum CreationFlags { - NoDCOPObject = 1 + NoDCOPObject = 1, + NewRefCountMode = 2 }; /** |