inc/debugtraces.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:12:40 +0300
changeset 44 36f374c67aa8
parent 23 238255e8b033
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#ifndef DEBUG_TRACES_H_
#define  DEBUG_TRACES_H_

#ifdef _DEBUG
  #include <QtDebug>
  #define _DEBUG_TRACES_
  
  #define QDEBUG_WRITE(str) {qDebug() << str;}
  #define QDEBUG_WRITE_FORMAT(str, val) {qDebug() << str << val;}
  #define QCRITICAL_WRITE(str) {qCritical() << str;}
  #define QCRITICAL_WRITE_FORMAT(str, val) {qCritical() << str << val;}
#else
  #undef _DEBUG_TRACES_
  
  #define QDEBUG_WRITE(str)
  #define QDEBUG_WRITE_FORMAT(str, val)
  #define QCRITICAL_WRITE(str)
  #define QCRITICAL_WRITE_FORMAT(str, val)
#endif // _DEBUG
#endif // DEBUG_TRACES_H_