Fix compile on 64-bit systems.

svn path=/trunk/KDE/kdebase/workspace/; revision=1049438
This commit is contained in:
Lucas Murray 2009-11-15 09:39:50 +00:00
parent 8fb19a44e7
commit 27d13ea5fb
12 changed files with 24 additions and 22 deletions

View file

@ -218,10 +218,10 @@ QList< ClientGroupItem > Bridge::clientGroupItems() const
return c->clientGroup()->items();
}
int Bridge::itemId( int index )
long Bridge::itemId( int index )
{
const ClientList list = c->clientGroup()->clients();
return reinterpret_cast<int>( list.at( index ));
return reinterpret_cast<long>( list.at( index ));
}
int Bridge::visibleClientGroupItem()
@ -239,7 +239,7 @@ void Bridge::moveItemInClientGroup( int index, int before )
c->clientGroup()->move( index, before );
}
void Bridge::moveItemToClientGroup( int itemId, int before )
void Bridge::moveItemToClientGroup( long itemId, int before )
{
Client* item = reinterpret_cast<Client*>( itemId );
c->workspace()->moveItemToClientGroup( item->clientGroup(), item->clientGroup()->indexOfClient( item ),

View file

@ -80,11 +80,11 @@ class Bridge : public KDecorationBridgeUnstable
// Window tabbing
virtual bool isClientGroupActive();
virtual QList< ClientGroupItem > clientGroupItems() const;
virtual int itemId( int index );
virtual long itemId( int index );
virtual int visibleClientGroupItem();
virtual void setVisibleClientGroupItem( int index );
virtual void moveItemInClientGroup( int index, int before );
virtual void moveItemToClientGroup( int itemId, int before );
virtual void moveItemToClientGroup( long itemId, int before );
virtual void removeFromClientGroup( int index, const QRect& newGeom );
virtual void closeClientGroupItem( int index );
virtual void closeAllInClientGroup();

View file

@ -1616,7 +1616,7 @@ namespace Oxygen
setForceActive( true );
int itemClicked( OxygenClient::itemClicked( point, true ) );
int source = QString( groupData->data( clientGroupItemDragMimeType() ) ).toInt();
long source = QString( groupData->data( clientGroupItemDragMimeType() ) ).toLong();
moveItemToClientGroup( source, itemClicked );
}

View file

@ -380,7 +380,7 @@ bool TabstripDecoration::dropEvent( QDropEvent* e )
}
else
{
int source = QString( group_data->data( clientGroupItemDragMimeType() ) ).toInt();
long source = QString( group_data->data( clientGroupItemDragMimeType() ) ).toLong();
moveItemToClientGroup( source, itemClicked( point, true ));
}
return true;

View file

@ -480,7 +480,7 @@ QList< ClientGroupItem > KDecorationPreviewBridge::clientGroupItems() const
active ? "Active Window" : "Inactive Window", icon() );
}
int KDecorationPreviewBridge::itemId( int )
long KDecorationPreviewBridge::itemId( int )
{
return 0;
}
@ -498,7 +498,7 @@ void KDecorationPreviewBridge::moveItemInClientGroup( int, int )
{
}
void KDecorationPreviewBridge::moveItemToClientGroup( int, int )
void KDecorationPreviewBridge::moveItemToClientGroup( long, int )
{
}

View file

@ -119,11 +119,11 @@ class KDecorationPreviewBridge
// Window tabbing
virtual bool isClientGroupActive();
virtual QList< ClientGroupItem > clientGroupItems() const;
virtual int itemId( int index );
virtual long itemId( int index );
virtual int visibleClientGroupItem();
virtual void setVisibleClientGroupItem( int index );
virtual void moveItemInClientGroup( int index, int before );
virtual void moveItemToClientGroup( int itemId, int before );
virtual void moveItemToClientGroup( long itemId, int before );
virtual void removeFromClientGroup( int index, const QRect& newGeom );
virtual void closeClientGroupItem( int index );
virtual void closeAllInClientGroup();

View file

@ -1291,7 +1291,7 @@ QList< ClientGroupItem > KCommonDecorationUnstable::clientGroupItems() const
return static_cast<const KDecorationUnstable*>( decoration() )->clientGroupItems();
}
int KCommonDecorationUnstable::itemId( int index )
long KCommonDecorationUnstable::itemId( int index )
{
return static_cast<const KDecorationUnstable*>( decoration() )->itemId( index );
}
@ -1311,7 +1311,7 @@ void KCommonDecorationUnstable::moveItemInClientGroup( int index, int before )
static_cast<const KDecorationUnstable*>( decoration() )->moveItemInClientGroup( index, before );
}
void KCommonDecorationUnstable::moveItemToClientGroup( int itemId, int before )
void KCommonDecorationUnstable::moveItemToClientGroup( long itemId, int before )
{
static_cast<const KDecorationUnstable*>( decoration() )->moveItemToClientGroup( itemId, before );
}

View file

@ -384,11 +384,11 @@ class KWIN_EXPORT KCommonDecorationUnstable
// Window tabbing
bool isClientGroupActive();
QList< ClientGroupItem > clientGroupItems() const;
int itemId( int index );
long itemId( int index );
int visibleClientGroupItem();
void setVisibleClientGroupItem( int index );
void moveItemInClientGroup( int index, int before );
void moveItemToClientGroup( int itemId, int before = -1 );
void moveItemToClientGroup( long itemId, int before = -1 );
void removeFromClientGroup( int index, const QRect& newGeom = QRect() );
void closeClientGroupItem( int index );
void closeAllInClientGroup();

View file

@ -415,7 +415,7 @@ QList< ClientGroupItem > KDecorationUnstable::clientGroupItems() const
return static_cast< KDecorationBridgeUnstable* >( bridge_ )->clientGroupItems();
}
int KDecorationUnstable::itemId( int index )
long KDecorationUnstable::itemId( int index )
{
return static_cast< KDecorationBridgeUnstable* >( bridge_ )->itemId( index );
}
@ -435,7 +435,7 @@ void KDecorationUnstable::moveItemInClientGroup( int index, int before )
static_cast< KDecorationBridgeUnstable* >( bridge_ )->moveItemInClientGroup( index, before );
}
void KDecorationUnstable::moveItemToClientGroup( int itemId, int before )
void KDecorationUnstable::moveItemToClientGroup( long itemId, int before )
{
static_cast< KDecorationBridgeUnstable* >( bridge_ )->moveItemToClientGroup( itemId, before );
}

View file

@ -939,7 +939,7 @@ class KWIN_EXPORT KDecorationUnstable
* Returns a unique identifier for the client at index \p index of the client group list.
* \see moveItemToClientGroup()
*/
int itemId( int index );
long itemId( int index );
/**
* Returns the list index of the currently visible client in this group.
*/
@ -959,7 +959,7 @@ class KWIN_EXPORT KDecorationUnstable
* moveItemInClientGroup() instead.
* \see itemId()
*/
void moveItemToClientGroup( int itemId, int before = -1 );
void moveItemToClientGroup( long itemId, int before = -1 );
/**
* Remove the client at index \p index from the group. If \p newGeom is set then the client
* will move and resize to the specified geometry, otherwise it will stay where the group

View file

@ -98,11 +98,11 @@ class KWIN_EXPORT KDecorationBridgeUnstable
// Window tabbing
virtual bool isClientGroupActive() = 0;
virtual QList< ClientGroupItem > clientGroupItems() const = 0;
virtual int itemId( int index ) = 0;
virtual long itemId( int index ) = 0;
virtual int visibleClientGroupItem() = 0;
virtual void setVisibleClientGroupItem( int index ) = 0;
virtual void moveItemInClientGroup( int index, int before ) = 0;
virtual void moveItemToClientGroup( int itemId, int before ) = 0;
virtual void moveItemToClientGroup( long itemId, int before ) = 0;
virtual void removeFromClientGroup( int index, const QRect& newGeom ) = 0;
virtual void closeClientGroupItem( int index ) = 0;
virtual void closeAllInClientGroup() = 0;

4
sm.cpp
View file

@ -129,7 +129,9 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase )
cg.writeEntry( QString("stackingOrder")+n, unconstrained_stacking_order.indexOf( c ));
int group = 0;
if( c->clientGroup() )
group = c->clientGroup()->clients().count() > 1 ? (int) c->clientGroup() : 0;
group = c->clientGroup()->clients().count() > 1 ?
// KConfig doesn't support long so we need to live with less precision on 64-bit systems
static_cast<int>( reinterpret_cast<long>( c->clientGroup() )) : 0;
cg.writeEntry( QString("clientGroup")+n, group );
}
}