need to specify external references before the "using namespace" directive

to allow the linker to resove them!

svn path=/trunk/kdebase/kwin/; revision=83967
This commit is contained in:
Thomas Leitner 2001-02-22 09:45:19 +00:00
parent a920560ffa
commit 26772fa04e
2 changed files with 10 additions and 4 deletions

View file

@ -79,10 +79,15 @@ private:
};
using namespace KWinInternal;
// put all externs before the namespace statement to allow the linker
// to resolve them properly
extern Atom qt_wm_state;
extern Time kwin_time;
extern Atom qt_window_role;
extern Atom qt_sm_client_id;
using namespace KWinInternal;
static bool resizeHorizontalDirectionFixed = FALSE;
static bool resizeVerticalDirectionFixed = FALSE;
@ -2590,7 +2595,6 @@ void Client::keyPressEvent( QKeyEvent * e )
QCString Client::windowRole()
{
extern Atom qt_window_role;
Atom type;
int format;
unsigned long length, after;
@ -2608,7 +2612,6 @@ QCString Client::windowRole()
QCString Client::sessionId()
{
extern Atom qt_sm_client_id;
Atom type;
int format;
unsigned long length, after;

View file

@ -15,6 +15,10 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
#include <kconfig.h>
#include <klocale.h>
// specify externals before namespace
extern QPixmap* kwin_get_menu_pix_hack();
using namespace KWinInternal;
const bool options_traverse_all = FALSE; // TODO
@ -204,7 +208,6 @@ void TabBox::paintEvent( QPaintEvent* )
*/
void TabBox::paintContents()
{
extern QPixmap* kwin_get_menu_pix_hack();
QPixmap* menu_pix = kwin_get_menu_pix_hack();
QPainter p( this );
QRect r( 6, 6, width()-12, height()-32 );