Commit 0e9d8bdd authored by Mathieu Faverge's avatar Mathieu Faverge

Apply patch 1 from issue #13

parent bc373d0b
......@@ -81,8 +81,8 @@ public:
#undef interface // Stupid windows :)
#endif
Message *Message::_message = NULL;
Interface *Message::_interface = NULL;
Message *Message::_message = nullptr;
Interface *Message::_interface = nullptr;
#ifdef _MSC_VER // TODO : Check if needed for icc
const Message::end_error_t Message::ende;
......@@ -105,7 +105,7 @@ Message *Message::get_instance() {
void Message::kill() {
if (_message)
delete _message;
_message = NULL;
_message = nullptr;
}
void Message::set_interface(Interface *interface) {
......
......@@ -25,7 +25,7 @@ Color *Palette::get_color(const std::string &state_name) {
if(_pairs.find(state_name) != _pairs.end())
return _pairs[state_name];
else{
return NULL;
return nullptr;
}
}
......
......@@ -146,15 +146,15 @@ bool ExportSettings::is_default() {
*/
//QSettings *Session::_settings = NULL;
Session *Session::S = NULL;
Palette *Session::_palettes_state = NULL;
Palette *Session::_palettes_link = NULL;
Palette *Session::_palettes_event = NULL;
Session *Session::S = nullptr;
Palette *Session::_palettes_state = nullptr;
Palette *Session::_palettes_link = nullptr;
Palette *Session::_palettes_event = nullptr;
bool Session::_use_palettes = false;
bool Session::_use_palettes_is_set = false;
MinimapSettings *Session::_mmSettings = NULL;
ExportSettings *Session::_exportSettings = NULL;
MinimapSettings *Session::_mmSettings = nullptr;
ExportSettings *Session::_exportSettings = nullptr;
Session::Session() : QSettings( VITE_ORGANISATION_NAME, VITE_APPLICATION_NAME ) {
QCoreApplication::setOrganizationName(VITE_ORGANISATION_NAME);
......
......@@ -167,7 +167,7 @@ protected:
public:
static Session &getSession() {
if (S == NULL) {
if (S == nullptr) {
S = new Session();
init();
}
......
......@@ -73,15 +73,15 @@ bool convert_to_double(const std::string &arg, double *val) {
// We had dots initially, we need to have the english system
if(is_english_system_needed) {
if((setlocale(LC_NUMERIC, "C") == NULL) &&
(setlocale(LC_NUMERIC, "en_GB.UTF-8") == NULL)){
if((setlocale(LC_NUMERIC, "C") == nullptr) &&
(setlocale(LC_NUMERIC, "en_GB.UTF-8") == nullptr)){
vite_warning("The locale en_GB.UTF-8 is unavailable so the decimal pointed will not be printed");
}
}
else { // It is comma separated
if ((setlocale(LC_NUMERIC, "fr_FR.UTF-8") == NULL) &&
(setlocale(LC_NUMERIC, "French") == NULL)){
if ((setlocale(LC_NUMERIC, "fr_FR.UTF-8") == nullptr) &&
(setlocale(LC_NUMERIC, "French") == nullptr)){
vite_warning("The locale fr_FR.UTF-8 is unavailable so the decimal with comma will not be printed");
}
......
......@@ -156,8 +156,8 @@ Core::Core(int &argc, char ** argv)
* graphic_app is used if a graphical interface is used
* console_app is used if we only care about the console interface
*/
graphic_app = NULL;
console_app = NULL;
graphic_app = nullptr;
console_app = nullptr;
/* Qt uses the default system encoding for QString (used when opening a file) */
#if QT_VERSION < 0x050000
......@@ -170,9 +170,9 @@ Core::Core(int &argc, char ** argv)
_run_env[1] = new QString(argv[0]);
/* Initialize global variable */
_main_window = NULL;
_render_opengl = NULL;
_trace = NULL;
_main_window = nullptr;
_render_opengl = nullptr;
_trace = nullptr;
_is_window_displayed = false;
_is_trace_loaded = false;
......@@ -207,30 +207,30 @@ Core::Core(int &argc, char ** argv)
QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
/* Start to launch actions */
launch_action(_state, NULL);
launch_action(_state, nullptr);
}
Core::~Core(){
if( _trace != NULL )
if( _trace != nullptr )
delete _trace;
if ( _run_env[0] != NULL )
if ( _run_env[0] != nullptr )
delete _run_env[0];
if ( _run_env[1] != NULL )
if ( _run_env[1] != nullptr )
delete _run_env[1];
if ( _render_opengl != NULL ) {
if ( _render_opengl != nullptr ) {
_render_opengl->release();
delete _render_opengl;
}
/* Qt desallocates _main_window and _render_opengl automatically */
Message::kill();
if ( console_app != NULL ) delete console_app;
if ( graphic_app != NULL ) delete graphic_app;
if ( console_app != nullptr ) delete console_app;
if ( graphic_app != nullptr ) delete graphic_app;
}
/***********************************
......@@ -366,7 +366,7 @@ int Core::get_options(int &argc, char **argv)
**********************************/
bool Core::draw_trace(const string & filename, const int format) {
parser = NULL;
parser = nullptr;
DrawTrace drawing_ogl;
bool killed=false;
......@@ -392,7 +392,7 @@ bool Core::draw_trace(const string & filename, const int format) {
_main_window->update_recent_files_menu();
}
if (NULL == _trace) { /* no trace is loaded, parse the file */
if (nullptr == _trace) { /* no trace is loaded, parse the file */
/* Init data */
Info::Entity::x_min = 0;
......@@ -428,7 +428,7 @@ bool Core::draw_trace(const string & filename, const int format) {
int loaded = 0;
float loaded_f = 0.0f;/* floating value of the loading file state. (between 0 and 1) */
if(_main_window != NULL) { // If we have a window we show a progress bar
if(_main_window != nullptr) { // If we have a window we show a progress bar
_main_window->init_parsing(filename);
}
......@@ -515,7 +515,7 @@ bool Core::draw_trace(const string & filename, const int format) {
if(parser->is_end_of_parsing() && !killed){
if(!_xml_config_file.empty() && _trace->get_view_root_containers()->empty()){//if we have a partial loading, process it here, but only once
launch_action(_DRAW_OPENGL_PARTIAL,NULL);
launch_action(_DRAW_OPENGL_PARTIAL,nullptr);
}
QMutexLocker locker(_mutex);
......@@ -562,7 +562,7 @@ bool Core::draw_trace(const string & filename, const int format) {
cout << endl;
if(_main_window != NULL) { // If we have a window we show a progress bar
if(_main_window != nullptr) { // If we have a window we show a progress bar
_main_window->update_progress_bar(QString(buf_txt.str().c_str()), loaded);
QApplication::processEvents();
......@@ -580,7 +580,7 @@ bool Core::draw_trace(const string & filename, const int format) {
}
}
delete parser;
parser=NULL;
parser=nullptr;
thread.quit();
thread.wait();
......@@ -591,17 +591,17 @@ bool Core::draw_trace(const string & filename, const int format) {
//while(!thread.wait()) {
//}
if(_main_window != NULL) { // If we have a window we show a progress bar
if(_main_window != nullptr) { // If we have a window we show a progress bar
_main_window->end_parsing();
}
delete parser;
parser=NULL;
parser=nullptr;
}
else if ( _file_opened != filename) {/* just check if execution is normal */
*Message::get_instance() << "Try to use file: " << filename << " instead of a previous parsed file: " << _file_opened << Message::ende;
}
if(_trace!=NULL && !killed){
if(_trace!=nullptr && !killed){
if (Info::Render::_x_min_visible == Info::Render::_x_max_visible){ // first time
_trace->set_interval_constrained(new Interval(0,_trace->get_max_date()));
}else{
......@@ -609,7 +609,7 @@ bool Core::draw_trace(const string & filename, const int format) {
}
if(!_xml_config_file.empty() && _trace->get_view_root_containers()->empty()){//if we have a partial loading, process it here, but only once
launch_action(_DRAW_OPENGL_PARTIAL,NULL);
launch_action(_DRAW_OPENGL_PARTIAL,nullptr);
}
if (_DRAW_OPENGL == format) {
GanttDiagram render(_render_opengl);
......@@ -729,13 +729,13 @@ void Core::launch_action(int state, void* arg) {
_render_opengl = new Render_opengl (this, _main_window, format);
#endif
if ( NULL == _render_opengl){
if ( nullptr == _render_opengl){
message << QObject::tr("Cannot allocate memory for an OpengGL instance").toStdString ()
<< Message::ende;
break;
}
if (NULL == _render_opengl->context()){
if (nullptr == _render_opengl->context()){
message << QObject::tr("Cannot allocate an OpengGL context").toStdString ()
<< Message::ende;
break;
......@@ -785,7 +785,7 @@ void Core::launch_action(int state, void* arg) {
case _STATE_OPEN_FILE_IN_AN_INTERVAL:
launch_action(_STATE_OPEN_FILE, NULL);
launch_action(_STATE_OPEN_FILE, nullptr);
break;
case _STATE_RELEASE_RENDER_AREA:
......@@ -811,11 +811,11 @@ void Core::launch_action(int state, void* arg) {
_is_trace_loaded = false;
}
if (NULL == _trace) {
if (nullptr == _trace) {
*Message::get_instance() << "Try to release a render area whereas no trace is loaded" << Message::ende;
} else {
delete _trace;
_trace = NULL;
_trace = nullptr;
}
_render_opengl->updateGL();
......@@ -897,7 +897,7 @@ void Core::launch_action(int state, void* arg) {
break;
case _STATE_RENDER_DISPLAY_INFORMATION:
if(_trace != NULL){
if(_trace != nullptr){
buf.display_information(_trace, Info::Render::_info_x, Info::Render::_info_y, Info::Render::_info_accurate);
}
break;
......@@ -925,8 +925,8 @@ void Core::launch_action(int state, void* arg) {
{
Element_pos yr = ((Element_pos*)arg)[0];
Element_pos yr2 = ((Element_pos*)arg)[1];
const Container* container=NULL;
const Container* container2=NULL;
const Container* container=nullptr;
const Container* container2=nullptr;
const Container::Vector *root_containers = _trace->get_view_root_containers();
if(root_containers->empty())root_containers= _trace->get_root_containers();
if (!root_containers->empty()){
......@@ -976,9 +976,9 @@ void Core::launch_action(int state, void* arg) {
//printf("we ask to switch %s and %s \n", container->get_name().to_string().c_str(), container2->get_name().to_string().c_str());
const std::list<Container*>* children=NULL;
const std::list<Container*>* children=nullptr;
if(parent==NULL){//we switch top level containers
if(parent==nullptr){//we switch top level containers
children = _trace->get_view_root_containers();
if(children->empty()) children = _trace->get_root_containers();
}else{
......@@ -988,7 +988,7 @@ void Core::launch_action(int state, void* arg) {
std::list<Container*>::const_iterator it= children->begin();
const std::list<Container*>::const_iterator it_end= children->end();
if(parent!=NULL){
if(parent!=nullptr){
parent->clear_view_children();
for(; it!=it_end; it++){
if((*it)==container) parent->add_view_child(const_cast<Container*>(container2));
......@@ -1043,7 +1043,7 @@ void Core::launch_action(int state, void* arg) {
case _STATE_UPDATE_VARVALUES:
{
if( NULL != _trace ) {
if( nullptr != _trace ) {
std::map<long int, double> var_map = _trace->update_text_variable_values(((Element_pos*)arg)[0]);
buf.draw_text_variable_values(_render_opengl,&var_map,((Element_pos*)arg)[0]);
}
......
......@@ -248,7 +248,7 @@ class Core : public QObject, public Interface {
* of the warning or error messages will be displayed in dialog boxes.</li>
* </ul>
*/
void launch_action(int state, void* arg = NULL);
void launch_action(int state, void* arg = nullptr);
QEventLoop *waitGUIInit;
......
......@@ -119,11 +119,11 @@ Interface_graphic::Interface_graphic(Core* core, QWidget *parent):QMainWindow(pa
setMouseTracking (true);/* to catch mouse events */
_progress_dialog = NULL;
_plugin_window = NULL;
_ui_settings = NULL;
_ui_node_selection=NULL;
_ui_interval_selection=NULL;
_progress_dialog = nullptr;
_plugin_window = nullptr;
_ui_settings = nullptr;
_ui_node_selection=nullptr;
_ui_interval_selection=nullptr;
_cmd_window = new Command_window(this,this);
// For drag and drop operations
......@@ -134,10 +134,10 @@ Interface_graphic::~Interface_graphic(){
/* Qt desallocates this, _ui_info_window and _render_area automatically */
delete _plugin_window;
_plugin_window = NULL;
_plugin_window = nullptr;
delete _cmd_window;
_cmd_window = NULL;
_cmd_window = nullptr;
}
......@@ -236,7 +236,7 @@ void Interface_graphic::load_windows(){
// For the recent files menu
for (int i = 0 ; i < Session::_MAX_NB_RECENT_FILES ; ++ i) {
_recent_file_actions[i] = NULL;
_recent_file_actions[i] = nullptr;
}
update_recent_files_menu();
......@@ -246,7 +246,7 @@ void Interface_graphic::load_windows(){
the signal corresponding to 'action'.
/!\ -> use NULL as argument, else messages will be duplicated!
*/
QMetaObject::connectSlotsByName(NULL);
QMetaObject::connectSlotsByName(nullptr);
_ui_x_scroll->setMaximum(_REAL_X_SCROLL_LENGTH);
_ui_y_scroll->setMaximum(_REAL_Y_SCROLL_LENGTH);
......@@ -408,7 +408,7 @@ void Interface_graphic::change_zoom_box_value(int new_value){
}
//update the interval selection display
if(_ui_interval_selection!=NULL)_ui_interval_selection->update_values();
if(_ui_interval_selection!=nullptr)_ui_interval_selection->update_values();
}
/***********************************
......@@ -561,7 +561,7 @@ void Interface_graphic::on_reload_triggered() {
if(_is_rendering_trace) {
Element_pos zoom[2] = { Info::Splitter::_x_min,
Info::Splitter::_x_max };
if( _ui_settings != NULL ) {
if( _ui_settings != nullptr ) {
_ui_settings->refresh();
}
// if(_ui_node_selection!=NULL)
......@@ -586,7 +586,7 @@ void Interface_graphic::on_reload_triggered() {
scale_container_state->setValue(20);
//update the interval selection display
if( _ui_interval_selection != NULL ) {
if( _ui_interval_selection != nullptr ) {
_ui_interval_selection->update_values();
}
}
......@@ -602,7 +602,7 @@ void Interface_graphic::on_clear_recent_files_triggered() {
Session::clear_recent_files();
// We remove the elements from the menu
for(int i = 0 ; i < Session::_MAX_NB_RECENT_FILES ; ++ i) {
if(_recent_file_actions[i] != NULL) {
if(_recent_file_actions[i] != nullptr) {
_ui_recent_files_menu->removeAction(_recent_file_actions[i]);
}
}
......@@ -683,7 +683,7 @@ void Interface_graphic::on_close_triggered(){
_ui_settings->hide();
}
if(_plugin_window != NULL) {
if(_plugin_window != nullptr) {
_plugin_window->hide();
//_plugin_window->clear_plugins();
}
......@@ -691,7 +691,7 @@ void Interface_graphic::on_close_triggered(){
_core->launch_action(Core::_STATE_RELEASE_RENDER_AREA);
if (_cmd_window){
delete _cmd_window;
_cmd_window = NULL;
_cmd_window = nullptr;
}
_is_rendering_trace = false;
......@@ -704,13 +704,13 @@ void Interface_graphic::on_close_triggered(){
void Interface_graphic::on_quit_triggered(){
if( NULL != _ui_node_selection)
if( nullptr != _ui_node_selection)
((QWidget*)_ui_node_selection)->close();
if( NULL != _ui_interval_selection)
if( nullptr != _ui_interval_selection)
((QWidget*)_ui_interval_selection)->close();
if( NULL != _ui_help_window)
if( nullptr != _ui_help_window)
((QWidget*)_ui_help_window)->close();
if( NULL != _ui_info_window)
if( nullptr != _ui_info_window)
((QWidget*)_ui_info_window)->close();
((QWidget*)this)->close();
}
......@@ -765,7 +765,7 @@ void Interface_graphic::on_toolbar_menu_triggered(){
void Interface_graphic::on_minimap_menu_triggered(){
_core->launch_action(Core::_STATE_RENDER_SHOW_MINIMAP,NULL);
_core->launch_action(Core::_STATE_RENDER_SHOW_MINIMAP,nullptr);
}
......@@ -816,11 +816,11 @@ void Interface_graphic::on_about_triggered(){
void Interface_graphic::on_show_plugins_triggered()
{
if(_plugin_window == NULL) { //Creation of the window
if(_plugin_window == nullptr) { //Creation of the window
_plugin_window = new Plugin_window( _core, this );
}
if( _core->get_trace() != NULL ) {
if( _core->get_trace() != nullptr ) {
_plugin_window->update_trace();
}
......@@ -843,10 +843,10 @@ void Interface_graphic::on_show_settings_triggered() {
void Interface_graphic::on_node_selection_triggered() {
if (!_ui_node_selection){
_ui_node_selection = new Node_select(this, 0);
_ui_node_selection = new Node_select(this, nullptr);
connect(quit, SIGNAL(triggered()), _ui_node_selection, SLOT(close()));
}
if(_core->get_trace() != NULL) {
if(_core->get_trace() != nullptr) {
if(!_ui_node_selection->get_trace()){//first use
_ui_node_selection->set_trace(_core->get_trace());
}
......@@ -858,10 +858,10 @@ void Interface_graphic::on_node_selection_triggered() {
void Interface_graphic::on_interval_selection_triggered() {
if(!_ui_interval_selection){
_ui_interval_selection = new Interval_select(this, 0);
_ui_interval_selection = new Interval_select(this, nullptr);
connect(quit, SIGNAL(triggered()), _ui_interval_selection, SLOT(close()));
}
if(_core->get_trace() != NULL) {
if(_core->get_trace() != nullptr) {
if(!_ui_interval_selection->get_trace() && _core->get_trace()){//first use
_ui_interval_selection->set_trace(_core->get_trace());
......@@ -1043,7 +1043,7 @@ void Interface_graphic::update_recent_files_menu() {
QString absoluteFilename;
for (int i = 0 ; i < Session::_MAX_NB_RECENT_FILES && i < filenames.size() ; ++ i) {
if(_recent_file_actions[i] != NULL) {
if(_recent_file_actions[i] != nullptr) {
delete _recent_file_actions[i];
}
_recent_file_actions[i] = new QAction(this);
......
......@@ -332,7 +332,7 @@ public:
* \param core The Core object which launch the Interface_graphic. It can be viewed as the application core.
* \param parent The parent widget of the graphical interface. Should be ignored.
*/
Interface_graphic(Core* core, QWidget* parent = 0);
Interface_graphic(Core* core, QWidget* parent = nullptr);
/*!
......
......@@ -76,7 +76,7 @@
using namespace std;
Interval_select::Interval_select(Interface_graphic * console,QWidget *parent) : QDialog(parent), _trace(NULL),_console(console) {
Interval_select::Interval_select(Interface_graphic * console,QWidget *parent) : QDialog(parent), _trace(nullptr),_console(console) {
setupUi(this);
connect( minSpinBox, SIGNAL(valueChanged( double )), SLOT(minSpinBoxValueChanged( double )) );
connect( maxSpinBox, SIGNAL(valueChanged( double )), SLOT(maxSpinBoxValueChanged( double )) );
......@@ -84,7 +84,7 @@ Interval_select::Interval_select(Interface_graphic * console,QWidget *parent) :
connect( interval_slider, SIGNAL(lowerValueChanged( int )), SLOT(minSliderValueChanged( int )) );
connect( interval_slider, SIGNAL(upperValueChanged( int )), SLOT(maxSliderValueChanged( int )) );
QMetaObject::connectSlotsByName(NULL);
QMetaObject::connectSlotsByName(nullptr);
_auto_refresh = auto_refresh_box->isChecked();
_applied = false;
......@@ -124,7 +124,7 @@ void Interval_select::set_trace(Trace *trace) {
//called if a zoom is triggered outside of the window, to update slider position and spinboxes with the real values
void Interval_select::update_values() {
if ( _trace != NULL )
if ( _trace != nullptr )
{
Element_pos _min;
Element_pos _max;
......
......@@ -92,7 +92,7 @@ public:
* Default constructor
* \param parent The parent widget of the window.
*/
Interval_select( Interface_graphic *console, QWidget *parent = 0);
Interval_select( Interface_graphic *console, QWidget *parent = nullptr);
~Interval_select();
......
......@@ -79,12 +79,12 @@ Q_DECLARE_METATYPE( Container * );
using namespace std;
Node_select::Node_select(Interface_graphic * console,QWidget *parent) : QWidget(parent), _trace(NULL),_console(console), _sort_order(false) {
Node_select::Node_select(Interface_graphic * console,QWidget *parent) : QWidget(parent), _trace(nullptr),_console(console), _sort_order(false) {
setupUi(this);
QMetaObject::connectSlotsByName(NULL);
QMetaObject::connectSlotsByName(nullptr);
}
Node_select::~Node_select() {
......@@ -107,7 +107,7 @@ void Node_select::set_initial_container_names(){
it ++) {
string name = (*it)->get_Name().to_string();
QStringList temp(QString::fromStdString(name));
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)0, temp);
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)nullptr, temp);
current_node->setData(0,Qt::UserRole,qVariantFromValue(*it));//store the pointer to the container in the Data field
items.append(current_node);
......@@ -142,7 +142,7 @@ void Node_select::set_displayed_container_names(){
it ++) {
string name = (*it)->get_Name().to_string();
QStringList temp(QString::fromStdString(name));
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)0, temp);
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)nullptr, temp);
current_node->setFlags(flg);
current_node->setCheckState(0,Qt::Checked);
......@@ -249,9 +249,9 @@ void Node_select::on_reset_button_clicked(){
QList<QTreeWidgetItem *> items;
QTreeWidgetItemIterator it(_nodes_original);//browse only top containers
while (*it) {
if((*it)->parent()==NULL){//we only want parent nodes
if((*it)->parent()==nullptr){//we only want parent nodes
_displayed_containers.push_back(((*it)->data(0,Qt::UserRole)).value<Container*>());
reassign_children_rec(*it, 0);
reassign_children_rec(*it, nullptr);
}
++it;
......@@ -342,7 +342,7 @@ void Node_select::on_display_button_clicked(){
void Node_select::build_displayed_nodes( std::list<Container *>& displayed_containers){
QTreeWidgetItemIterator it(_nodes_displayed, QTreeWidgetItemIterator::Checked);//browse only top containers
while (*it) {
if((*it)->parent()==NULL){//we only want parent nodes
if((*it)->parent()==nullptr){//we only want parent nodes
displayed_containers.push_back(((*it)->data(0,Qt::UserRole)).value<Container*>());
QFlags<Qt::CheckState> flg(Qt::Checked|Qt::PartiallyChecked);
reassign_children_rec(*it,flg);
......@@ -399,7 +399,7 @@ void Node_select::on_export_button_clicked(){
QTreeWidgetItemIterator it(_nodes_displayed);//browse only top containers
while (*it) {
if((*it)->parent()==NULL){//we only want parent nodes
if((*it)->parent()==nullptr){//we only want parent nodes
QDomElement rootElement = doc.createElement( "rootNode" );
rootElement.setAttribute( "name", QString((*it)->data(0,Qt::UserRole).value<Container*>()->get_Name().to_string().c_str()) );
......
......@@ -99,7 +99,7 @@ public:
* Default constructor
* \param parent The parent widget of the window.
*/
Node_select( Interface_graphic *console, QWidget *parent = 0);
Node_select( Interface_graphic *console, QWidget *parent = nullptr);
~Node_select();
......
......@@ -81,7 +81,7 @@ Settings_tab::Settings_tab(Core *core, std::string ecname)
// Create the header
hdr_label = new QLabel(this);
hdr_label->setObjectName(QString("hdr_label"));
hdr_label->setText(QApplication::translate("settings", "Colors set:", 0));
hdr_label->setText(QApplication::translate("settings", "Colors set:", nullptr));
list_palette = new QComboBox(this);
list_palette->setObjectName(QString("list_palette"));
......@@ -90,11 +90,11 @@ Settings_tab::Settings_tab(Core *core, std::string ecname)
btn_palette_cp = new QPushButton(this);
btn_palette_cp->setObjectName(QString("btn_palette_cp"));
btn_palette_cp->setText(QApplication::translate("settings", "Copy", 0));
btn_palette_cp->setText(QApplication::translate("settings", "Copy", nullptr));
btn_palette_rm = new QPushButton(this);
btn_palette_rm->setObjectName(QString("btn_palette_rm"));
btn_palette_rm->setText(QApplication::translate("settings", "Remove", 0));
btn_palette_rm->setText(QApplication::translate("settings", "Remove", nullptr));
header = new QHBoxLayout();
header->setObjectName(QString("header"));
......@@ -111,15 +111,15 @@ Settings_tab::Settings_tab(Core *core, std::string ecname)
QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
content->setHorizontalHeaderItem(0, __qtablewidgetitem);
__qtablewidgetitem->setText(QApplication::translate("settings", "Name", 0));
__qtablewidgetitem->setText(QApplication::translate("settings", "Name", nullptr));
QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem();
content->setHorizontalHeaderItem(1, __qtablewidgetitem1);
__qtablewidgetitem1->setText(QApplication::translate("settings", "Color", 0));
__qtablewidgetitem1->setText(QApplication::translate("settings", "Color", nullptr));
QTableWidgetItem *__qtablewidgetitem2 = new QTableWidgetItem();
content->setHorizontalHeaderItem(2, __qtablewidgetitem2);
__qtablewidgetitem2->setText(QApplication::translate("settings", "Visible", 0));
__qtablewidgetitem2->setText(QApplication::translate("settings", "Visible", nullptr));
QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy3.setHorizontalStretch(100);
......@@ -132,17 +132,17 @@ Settings_tab::Settings_tab(Core *core, std::string ecname)
btn_apply = new QPushButton(this);
btn_apply->setObjectName(QString("btn_apply"));
btn_apply->setText(QApplication::translate("settings", "Apply", 0));
btn_apply->setText(QApplication::translate("settings", "Apply", nullptr));
btn_cancel = new QPushButton(this);
btn_cancel->setObjectName(QString("btn_cancel"));
btn_cancel->setText(QApplication::translate("settings", "Cancel", 0));
btn_cancel->setText(QApplication::translate("settings", "Cancel", nullptr));
btn_reload = new QPushButton(this);
btn_reload->setObjectName(QString("btn_reload"));
btn_reload->setText(QApplication::translate("settings", "Reload from file", 0));
btn_reload->setText(QApplication::translate("settings", "Reload from file", nullptr));
#ifndef QT_NO_TOOLTIP
btn_reload->setToolTip(QApplication::translate("settings", "Reload all the states types from the displayed trace", 0));
btn_reload->setToolTip(QApplication::translate("settings", "Reload all the states types from the displayed trace", nullptr));
#endif // QT_NO_TOOLTIP
footer = new QHBoxLayout();
......@@ -243,7 +243,7 @@ Settings_tab::add_table_line(int &row,
QTableWidgetItem *alias = new QTableWidgetItem(ev->get_alias().c_str());
/* Color */
Color *c = NULL;
Color *c = nullptr;
QtColorPicker *color_widget = new QtColorPicker();
color_widget->setStandardColors();
if(used) {
......@@ -330,7 +330,7 @@ Settings_tab::update_table_from_palette( string pname )
string ev_alias = content->item(i, 3)->text().toStdString();
Color *c = p->get_color( ev_name );
if ( c != NULL ) {
if ( c != nullptr ) {
_changed = true;
bool v = p->is_visible( ev_name );
......
......@@ -159,7 +159,7 @@ public:
* Default constructor
* \param parent The parent widget of the window.
*/
Settings_window(Core *c, QWidget *parent = 0);
Settings_window(Core *c, QWidget *parent = nullptr);
~Settings_window();
......
......@@ -42,8 +42,8 @@ class QxtSpanSlider : public QSlider
Q_ENUMS(HandleMovementMode)
public:
explicit QxtSpanSlider(QWidget* parent = 0);
explicit QxtSpanSlider(Qt::Orientation orientation, QWidget* parent = 0);
explicit QxtSpanSlider(QWidget* parent = nullptr);
explicit QxtSpanSlider(Qt::Orientation orientation, QWidget* parent = nullptr);
virtual ~QxtSpanSlider();