Commit 91fe2a8f authored by Stéphane Albert's avatar Stéphane Albert
Browse files

COMP: Replaced _DEBUG definition by OTB_DEBUG one.

parent efe6e66b
......@@ -228,12 +228,12 @@ namespace otb
//
// Unused variable warnings in Debug/Release management.
// see http://stackoverflow.com/questions/2290509/debug-vs-ndebug#2290616
#ifdef NDEBUG
# define otbUseInDebug( name )
# define otbUseInRelease( name ) name
#else // NDEBUG
#ifdef OTB_DEBUG
# define otbUseInDebug( name ) name
# define otbUseInRelease( name )
#else // NDEBUG
# define otbUseInDebug( name )
# define otbUseInRelease( name ) name
#endif // NDEBUG
#endif //end of otbMacro.h
......@@ -70,7 +70,7 @@ main( int argc, char* argv[] )
//
// 0. Splash-screen.
#if !defined( _DEBUG )
#if !defined( OTB_DEBUG )
QPixmap pixmap(QLatin1String( ":/images/application_splash" ));
QSplashScreen splash(pixmap);
splash.show();
......@@ -136,10 +136,10 @@ main( int argc, char* argv[] )
//
// 5. Show window.
#if defined( _DEBUG )
#else // _DEBUG
#if defined( OTB_DEBUG )
#else // OTB_DEBUG
splash.finish(&mainWindow);
#endif // _DEBUG
#endif // OTB_DEBUG
// Usefull when developping/debugging to avoid overlapping other windows.
mainWindow.show();
......
......@@ -26,7 +26,7 @@
#include "ConfigureMonteverdi.h"
#define USE_TABBED_VIEW 0
#define USE_PIXEL_DESCRIPTION ( ( defined( _DEBUG ) && 0 ) || 0 )
#define USE_PIXEL_DESCRIPTION ( ( defined( OTB_DEBUG ) && 0 ) || 0 )
#define RENDER_IMAGE_VIEW_DISABLED 0
#define RENDER_QUICKLOOK_VIEW_DISABLED 0
......@@ -37,7 +37,7 @@
#ifndef USE_OTB_APPS
# define USE_OTB_APPS ( ( defined( _DEBUG ) && 0 ) || 1 )
# define USE_OTB_APPS ( ( defined( OTB_DEBUG ) && 0 ) || 1 )
#endif
//
......
......@@ -72,7 +72,7 @@ main( int argc, char* argv[] )
//
// 0. Splash-screen.
#if !defined( _DEBUG ) && USE_SPLASH_SCREEN
#if !defined( OTB_DEBUG ) && USE_SPLASH_SCREEN
QPixmap pixmap(QLatin1String( ":/images/application_splash" ));
QSplashScreen splash(pixmap);
splash.show();
......@@ -155,11 +155,11 @@ main( int argc, char* argv[] )
//
// 3. Show window.
#if defined( _DEBUG )
#if defined( OTB_DEBUG )
// Usefull when developping/debugging to avoid overlapping other windows.
mainWindow.show();
#else // _DEBUG
#else // OTB_DEBUG
#if USE_SPLASH_SCREEN
splash.finish( &mainWindow );
......@@ -168,7 +168,7 @@ main( int argc, char* argv[] )
// TODO: Correctly manage main-window state via application settings.
mainWindow.showMaximized();
#endif // _DEBUG
#endif // OTB_DEBUG
//
// 4. Check OpenGL capabilities
......
......@@ -103,7 +103,7 @@ namespace mvd
#define REFERENCE_LAYER_COMBOBOX_NAME "referenceLayerComboBox"
#define FORCE_NO_GLSL ( ( defined( _DEBUG ) && 0 ) || 0 )
#define FORCE_NO_GLSL ( ( defined( OTB_DEBUG ) && 0 ) || 0 )
/*****************************************************************************/
/* STATIC IMPLEMENTATION SECTION */
......@@ -221,11 +221,11 @@ MainWindow
setObjectName( PROJECT_NAME );
#ifdef _DEBUG
#ifdef OTB_DEBUG
setWindowTitle( PROJECT_NAME "(Debug)" );
#else // _DEBUG
#else // OTB_DEBUG
setWindowTitle( PROJECT_NAME );
#endif // _DEBUG
#endif // OTB_DEBUG
InitializeCentralWidget();
......@@ -920,7 +920,7 @@ MainWindow
comboBox->setObjectName( "referenceLayerComboBox" );
comboBox->setMinimumSize(
QSize(
#ifdef _DEBUG
#ifdef OTB_DEBUG
116,
#else
128,
......@@ -1979,11 +1979,11 @@ MainWindow
assert( imageModel!=NULL );
setWindowTitle(
#ifdef _DEBUG
#ifdef OTB_DEBUG
QString( PROJECT_NAME " (Debug) - %1" )
#else // _DEBUG
#else // OTB_DEBUG
QString( PROJECT_NAME " - %1" )
#endif // _DEBUG
#endif // OTB_DEBUG
.arg( QFileInfo( imageModel->GetFilename() ).fileName() )
);
......
......@@ -316,7 +316,7 @@ private:
private slots:
};
#if _DEBUG
#if OTB_DEBUG
inline void trace( const std::vector< std::string > & );
#endif
......@@ -931,7 +931,7 @@ StackedLayerModel
}
/*****************************************************************************/
#if _DEBUG
#if OTB_DEBUG
inline
void
......
......@@ -84,7 +84,7 @@
#endif
#ifndef ECHO_QDEBUG
#define ECHO_QDEBUG !NO_QECHO && !NO_QDEBUG && defined( _DEBUG ) && 1
#define ECHO_QDEBUG !NO_QECHO && !NO_QDEBUG && defined( OTB_DEBUG ) && 1
#endif
#ifndef ECHO_QWARNING
......@@ -100,7 +100,7 @@
#endif
#ifndef LOG_QDEBUG
#define LOG_QDEBUG !NO_QLOG && !NO_QDEBUG && defined( _DEBUG ) && 0
#define LOG_QDEBUG !NO_QLOG && !NO_QDEBUG && defined( OTB_DEBUG ) && 0
#endif
#ifndef LOG_QWARNING
......@@ -129,8 +129,8 @@
//
// Options
// #if (defined( _DEBUG ) && FORCE_DISABLE) || FORCE_ENABLE
#define USE_OPTION_SAMPLE ((defined( _DEBUG ) && 0) || 0)
// #if (defined( OTB_DEBUG ) && FORCE_DISABLE) || FORCE_ENABLE
#define USE_OPTION_SAMPLE ((defined( OTB_DEBUG ) && 0) || 0)
//
// Macros
......
......@@ -320,7 +320,7 @@ StackedLayerModel
oss << "Layer #" << m_LayerCount++;
#ifdef _DEBUG
#ifdef OTB_DEBUG
oss << " (" << layerModel->metaObject()->className()
<< "@" << std::hex << layerModel << ")";
#endif
......
......@@ -28,9 +28,9 @@
//
#define USE_VIEW_SETTINGS_SIDE_EFFECT 1
//
#define USE_REMOTE_DESKTOP_DISABLED_RENDERING ((defined( _DEBUG ) && 0) || 0)
#define USE_REMOTE_DESKTOP_DISABLED_RENDERING ((defined( OTB_DEBUG ) && 0) || 0)
//
#define DISABLE_QUICKLOOK_VIEW ( ( defined( _DEBUG ) && 0 ) || 0 )
#define DISABLE_QUICKLOOK_VIEW ( ( defined( OTB_DEBUG ) && 0 ) || 0 )
/*****************************************************************************/
/* INCLUDE SECTION */
......
......@@ -500,10 +500,9 @@ ToolTipInitializer::result_type
ToolTipInitializer
::operator () ( argument_type otbUseInDebug( widget ) ) const
{
#if defined( OTB_DEBUG )
assert( widget!=NULL );
#if defined( _DEBUG )
widget->setToolTip(
widget->toolTip() +
"\n(" +
......@@ -511,7 +510,7 @@ ToolTipInitializer
")"
);
#endif // defined( _DEBUG )
#endif // defined( OTB_DEBUG )
}
/*****************************************************************************/
......
......@@ -532,7 +532,7 @@ void
ImageViewManipulator
::ResizeEvent( QResizeEvent * otbUseInDebug( e ) )
{
assert( e!=NULL );
// assert( e!=NULL );
// qDebug() << this << "::ResizeEvent(" << e << ")";
......@@ -546,6 +546,8 @@ ImageViewManipulator
#if USE_VIEW_SETTINGS_SIDE_EFFECT
#else // USE_VIEW_SETTINGS_SIDE_EFFECT
assert( e!=NULL );
SetViewportSize( e->size().width(), e->size().height() );
#endif // USE_VIEW_SETTINGS_SIDE_EFFECT
}
......
......@@ -302,7 +302,7 @@ ImportImagesDialog
// Append items.
itemModel->appendRow( items );
}
#if ( defined( _DEBUG ) && 1 ) || 0
#if ( defined( OTB_DEBUG ) && 1 ) || 0
else
qDebug() << "Skipped:" << filenames[ i ];
#endif
......
......@@ -976,13 +976,13 @@ void
LayerStackItemModel
::OnLayerDeleted( size_t idx )
{
#ifdef _DEBUG
#ifdef OTB_DEBUG
bool isRowRemoved =
#endif
removeRow( idx );
#ifdef _DEBUG
#ifdef OTB_DEBUG
assert( isRowRemoved && "QAbstractItemModel::removeRow() failed!" );
#endif
}
......
......@@ -344,7 +344,7 @@ QtWidgetView
SetupWidget( widget, InputProcessXMLInitializer() );
SetupWidget( widget, InputVectorDataInitializer() );
SetupWidget( widget, InputVectorDataListInitializer( this ) );
#if defined( _DEBUG )
#if defined( OTB_DEBUG )
SetupWidget( widget, ToolTipInitializer() );
#endif
......@@ -621,7 +621,7 @@ QtWidgetView
{
qWarning() << what;
#if defined( _DEBUG )
#if defined( OTB_DEBUG )
QMessageBox::warning(
this,
PROJECT_NAME,
......
......@@ -220,19 +220,15 @@ QuicklookViewManipulator
/******************************************************************************/
void
QuicklookViewManipulator
::WheelEvent( QWheelEvent * otbUseInDebug( e ) )
::WheelEvent( QWheelEvent * )
{
assert( e!=NULL );
}
/******************************************************************************/
void
QuicklookViewManipulator
::KeyPressEvent( QKeyEvent * otbUseInDebug( e ) )
::KeyPressEvent( QKeyEvent * )
{
assert( e!=NULL );
// qDebug() << this << "::KeyPressEvent(" << e << ")";
}
/******************************************************************************/
......@@ -240,9 +236,6 @@ void
QuicklookViewManipulator
::KeyReleaseEvent( QKeyEvent * otbUseInDebug( e ) )
{
assert( e!=NULL );
// qDebug() << this << "::KeyPressEvent(" << e << ")";
}
/*****************************************************************************/
......
......@@ -150,7 +150,7 @@ TaskProgressDialog
//
// Trace (for debugging purposes) if background-task thread is still
// running when destroying this dialog.
#if ( defined( _DEBUG ) && 1 ) || 0
#if ( defined( OTB_DEBUG ) && 1 ) || 0
if( m_BackgroundTask!=NULL &&
m_BackgroundTask->isRunning() )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment