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
pull/16/head
Timothy Pearson 10 years ago
parent 67d3c303f3
commit 7cd4adc908

@ -20,8 +20,6 @@
* Boston, MA 02110-1301, USA.
**/
#define KSOCK_INTERNAL_C_COMPILATION 1
#include <config.h>
#include <sys/types.h>
@ -42,7 +40,12 @@ extern "C" {
#define KSOCK_NO_BROKEN
#include "kdebug.h"
// FIXME
// FOR BINARY COMPATIBILITY ONLY
// REMOVE WHEN PRACTICAL!
#define TDESOCKET_BINARY_COMPAT_HACK 1
#include "ksock.h"
#undef TDESOCKET_BINARY_COMPAT_HACK
#include "kextsock.h"
#include "ksockaddr.h"

@ -342,10 +342,10 @@ protected:
int sock;
private:
// DEPRECATED
#ifdef KSOCK_INTERNAL_C_COMPILATION
// HACK
#ifdef TDESOCKET_BINARY_COMPAT_HACK
KDE_EXPORT bool bindAndListen();
#endif // KSOCK_INTERNAL_C_COMPILATION
#endif // TDESOCKET_BINARY_COMPAT_HACK
TDEServerSocket(const TDEServerSocket&);
TDEServerSocket& operator=(const TDEServerSocket&);

@ -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

@ -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);
}

@ -151,7 +151,8 @@ public:
*/
enum CreationFlags
{
NoDCOPObject = 1
NoDCOPObject = 1,
NewRefCountMode = 2
};
/**

Loading…
Cancel
Save