javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtlog.cpp
changeset 76 4ad59aaee882
parent 21 2a9601315dfc
equal deleted inserted replaced
69:773449708c84 76:4ad59aaee882
     1 /*******************************************************************************
     1 /*******************************************************************************
     2  * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved. This program and the accompanying materials
     3  * All rights reserved. This program and the accompanying materials
     4  * are made available under the terms of the Eclipse Public License v1.0
     4  * are made available under the terms of the Eclipse Public License v1.0
     5  * which accompanies this distribution, and is available at
     5  * which accompanies this distribution, and is available at
     6  * http://www.eclipse.org/legal/epl-v10.html
     6  * http://www.eclipse.org/legal/epl-v10.html
     7  *
     7  *
    14 
    14 
    15 #include "swtlog.h"
    15 #include "swtlog.h"
    16 
    16 
    17 using namespace Java::eSWT;
    17 using namespace Java::eSWT;
    18 
    18 
    19 SwtScopeLog::SwtScopeLog( const char* aFunctionName, const SwtLogType& aEnterType, const SwtLogType& aExitType )
    19 SWTQT_EXPORT SwtScopeLog::SwtScopeLog( const char* aFunctionName, const SwtLogType& aEnterType, const SwtLogType& aExitType )
    20     : mExitLogType( aExitType )
    20     : mExitLogType( aExitType )
    21 	{
    21     {
    22 	mFunctionName = new QString( aFunctionName );
    22     mFunctionName = new QString( aFunctionName );
    23 	SwtDataLog::LogData( "%s", mFunctionName->toLatin1().data(), aEnterType );
    23     SwtDataLog::LogData( "%s", mFunctionName->toLatin1().data(), aEnterType );
    24 	}
    24     }
    25 
    25 
    26 SwtScopeLog::SwtScopeLog()
    26 SwtScopeLog::SwtScopeLog()
    27 	{
    27     {
    28 	// Not used
    28     // Not used
    29 	}
    29     }
    30 
    30 
    31 SwtScopeLog::~SwtScopeLog()
    31 SWTQT_EXPORT SwtScopeLog::~SwtScopeLog()
    32 	{
    32     {
    33 	if( mFunctionName )
    33     if( mFunctionName )
    34 		{
    34         {
    35 		SwtDataLog::LogData( "%s", mFunctionName->toLatin1().data(), mExitLogType );
    35         SwtDataLog::LogData( "%s", mFunctionName->toLatin1().data(), mExitLogType );
    36 		delete mFunctionName;
    36         delete mFunctionName;
    37 		mFunctionName = NULL;
    37         mFunctionName = NULL;
    38 		}
    38         }
    39 	}
    39     }
    40 
    40