Fix invalid toolbar data structure size declarations

This cleans up a slew of Valgrind memcheck warnings
pull/16/head
Timothy Pearson 12 years ago
parent 3b58374eba
commit b1c819c323

@ -88,6 +88,7 @@ public:
m_enableContext = true;
m_parent = NULL;
m_xmlguiClient = 0;
oldPos = TQt::DockUnmanaged;
@ -225,7 +226,8 @@ TDEToolBar::~TDEToolBar()
void TDEToolBar::init( bool readConfig, bool honorStyle )
{
d = new TDEToolBarPrivate;
d = new TDEToolBarPrivate();
setFullSize( true );
d->m_honorStyle = honorStyle;
context = 0;
@ -1915,9 +1917,10 @@ void TDEToolBar::loadState( const TQDomElement &element )
// Apply transparent-toolbar-moving setting (ok, this is global to the mainwindow,
// but we do it only if there are toolbars...)
// KDE4: move to TDEMainWindow
if ( transparentSetting() != !mw->opaqueMoving() )
if ( transparentSetting() != !mw->opaqueMoving() ) {
mw->setOpaqueMoving( !transparentSetting() );
}
}
int TDEToolBar::dockWindowIndex()
{

@ -53,7 +53,31 @@ template class TQIntDict<TDEToolBarButton>;
class TDEToolBarButtonPrivate
{
public:
TDEToolBarButtonPrivate()
TDEToolBarButtonPrivate();
~TDEToolBarButtonPrivate();
int m_id;
bool m_buttonDown;
bool m_noStyle;
bool m_isSeparator;
bool m_isRadio;
bool m_highlight;
bool m_isRaised;
bool m_isActive;
TQString m_iconName;
TDEToolBar *m_parent;
TDEToolBar::IconText m_iconText;
int m_iconSize;
TQSize size;
TQPoint m_mousePressPos;
TDEInstance *m_instance;
};
TDEToolBarButtonPrivate::TDEToolBarButtonPrivate()
{
m_buttonDown = false;
@ -71,36 +95,17 @@ public:
m_parent = 0;
m_instance = TDEGlobal::instance();
}
~TDEToolBarButtonPrivate()
TDEToolBarButtonPrivate::~TDEToolBarButtonPrivate()
{
//
}
int m_id;
bool m_buttonDown : 1;
bool m_noStyle: 1;
bool m_isSeparator: 1;
bool m_isRadio: 1;
bool m_highlight: 1;
bool m_isRaised: 1;
bool m_isActive: 1;
TQString m_iconName;
TDEToolBar *m_parent;
TDEToolBar::IconText m_iconText;
int m_iconSize;
TQSize size;
TQPoint m_mousePressPos;
TDEInstance *m_instance;
};
// This will construct a separator
TDEToolBarButton::TDEToolBarButton( TQWidget *_parent, const char *_name )
: TQToolButton( _parent , _name)
{
d = new TDEToolBarButtonPrivate;
d = new TDEToolBarButtonPrivate();
resize(6,6);
hide();
@ -112,7 +117,7 @@ TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id,
const TQString &_txt, TDEInstance *_instance )
: TQToolButton( _parent, _name ), d( 0 )
{
d = new TDEToolBarButtonPrivate;
d = new TDEToolBarButtonPrivate();
d->m_id = _id;
TQToolButton::setTextLabel(_txt);
@ -146,7 +151,7 @@ TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id,
const TQString& txt)
: TQToolButton( _parent, name ), d( 0 )
{
d = new TDEToolBarButtonPrivate;
d = new TDEToolBarButtonPrivate();
d->m_id = _id;
TQToolButton::setTextLabel(txt);

Loading…
Cancel
Save