diff --git a/CMakeLists.txt b/CMakeLists.txt index a84496e59b374c35feb836e34a56becd1b8a04a4..ea7a298c9b7ad5552edf5490892ca3afea94811c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,13 @@ else() set( HAVE_QT5_15 OFF ) endif() +add_definitions( + -DQT_NO_CAST_TO_ASCII + -DQT_NO_URL_CAST_FROM_STRING + -DQT_NO_KEYWORDS + -DQT_NO_FOREACH +) + # # Find optional packages # diff --git a/externals/qtcolorpicker/src/qtcolorpicker.cpp b/externals/qtcolorpicker/src/qtcolorpicker.cpp index 6ea7167e2baaa7ba91149cd2184aedb59bf8d1a8..a45e78a2d0b97874a02191de0448340555c08374 100644 --- a/externals/qtcolorpicker/src/qtcolorpicker.cpp +++ b/externals/qtcolorpicker/src/qtcolorpicker.cpp @@ -145,7 +145,7 @@ class ColorPickerButton : public QFrame public: ColorPickerButton(QWidget *parent); -signals: +Q_SIGNALS: void clicked(); protected: @@ -176,11 +176,11 @@ public: void setSelected(bool); bool isSelected() const; -signals: +Q_SIGNALS: void clicked(); void selected(); -public slots: +public Q_SLOTS: void setColor(const QColor &color, const QString &text = QString()); protected: @@ -217,14 +217,14 @@ public: ColorPickerItem *find(const QColor &col) const; QColor color(int index) const; -signals: +Q_SIGNALS: void selected(const QColor &); void hid(); -public slots: +public Q_SLOTS: void getColorFromDialog(); -protected slots: +protected Q_SLOTS: void updateSelected(); protected: @@ -448,7 +448,7 @@ void QtColorPicker::setCurrentColor(const QColor &color) repaint(); item->setSelected(true); - emit colorChanged(color); + Q_EMIT colorChanged(color); } /*! @@ -669,7 +669,7 @@ void ColorPickerPopup::updateSelected() if (sender() && sender()->inherits("ColorPickerItem")) { ColorPickerItem *item = (ColorPickerItem *)sender(); lastSel = item->color(); - emit selected(item->color()); + Q_EMIT selected(item->color()); } hide(); @@ -754,7 +754,7 @@ void ColorPickerPopup::keyPressEvent(QKeyEvent *e) } lastSel = wi->color(); - emit selected(wi->color()); + Q_EMIT selected(wi->color()); hide(); } else if (w && w->inherits("QPushButton")) { ColorPickerItem *wi = reinterpret_cast<ColorPickerItem *>(w); @@ -774,7 +774,7 @@ void ColorPickerPopup::keyPressEvent(QKeyEvent *e) } lastSel = wi->color(); - emit selected(wi->color()); + Q_EMIT selected(wi->color()); hide(); } } @@ -801,7 +801,7 @@ void ColorPickerPopup::hideEvent(QHideEvent *e) setFocus(); - emit hid(); + Q_EMIT hid(); QFrame::hideEvent(e); } @@ -893,7 +893,7 @@ void ColorPickerPopup::getColorFromDialog() insertColor(col, tr("Custom"), -1); lastSel = col; - emit selected(col); + Q_EMIT selected(col); } /*! @@ -979,7 +979,7 @@ void ColorPickerItem::mouseMoveEvent(QMouseEvent *) void ColorPickerItem::mouseReleaseEvent(QMouseEvent *) { sel = true; - emit selected(); + Q_EMIT selected(); } /*! @@ -1047,7 +1047,7 @@ void ColorPickerButton::mouseReleaseEvent(QMouseEvent *) { setFrameShadow(Raised); repaint(); - emit clicked(); + Q_EMIT clicked(); } /*! @@ -1081,7 +1081,7 @@ void ColorPickerButton::keyReleaseEvent(QKeyEvent *e) } else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) { setFrameShadow(Raised); repaint(); - emit clicked(); + Q_EMIT clicked(); } else { QFrame::keyReleaseEvent(e); } diff --git a/plugins/CriticalPath/CriticalPath.hpp b/plugins/CriticalPath/CriticalPath.hpp index 26786612dd9dd4d8aa2b7fe0c212e8845ce25abe..714ea2df8d63c8e6381ebd34a7c563608f174a52 100644 --- a/plugins/CriticalPath/CriticalPath.hpp +++ b/plugins/CriticalPath/CriticalPath.hpp @@ -70,13 +70,13 @@ private: */ void set_line_edit_defaults( QLineEdit *le, std::string name, std::string def_name ); -public slots: +public Q_SLOTS: /* * \brief What to do when execute button is clicked */ void execute(); -private slots: +private Q_SLOTS: /* * \brief Button for openning Dag file, path is then put in correspondant QLineEdit in UI */ diff --git a/plugins/Distribution/Distribution.cpp b/plugins/Distribution/Distribution.cpp index fc3535f4d554110a4ceff08b6c7a449d1f7ae1c9..7a8dc1f0576aee0d152c86df7c20c4b8dec67f02 100644 --- a/plugins/Distribution/Distribution.cpp +++ b/plugins/Distribution/Distribution.cpp @@ -487,7 +487,7 @@ public: return "Distribution"; } -public slots: +public Q_SLOTS: void execute() { _text_info->clear(); QString text ("<center><h1> Distribution </h1></center>"); diff --git a/plugins/MatrixVisualizer/CMakeLists.txt b/plugins/MatrixVisualizer/CMakeLists.txt index 52ba21e7474620c6f3d4597cbe6db423a34a0bfe..ed2546c7d147b6ed5f2315f24f50f13351827b2e 100644 --- a/plugins/MatrixVisualizer/CMakeLists.txt +++ b/plugins/MatrixVisualizer/CMakeLists.txt @@ -76,7 +76,7 @@ QT5_WRAP_UI(MATRIXVISUALIZER_forms ${MATRIXVISUALIZER_forms_tmp} ) -include_directories(${CMAKE_BINARY_DIR}/plugins/MatrixVisualizer) +include_directories(${CMAKE_BINARY_DIR}/plugins/MatrixVisualizer ${CMAKE_CURRENT_SOURCE_DIR}) add_library(MatrixVisualizer SHARED ${MATRIXVISUALIZER_srcs} ${MATRIXVISUALIZER_forms}) diff --git a/plugins/MatrixVisualizer/Common/Zoom.hpp b/plugins/MatrixVisualizer/Common/Zoom.hpp index 6f625c857e141f905a3a4da30cdaf1e23f9e4eea..668cde695141489daa8d3ef56b68259146efa073 100644 --- a/plugins/MatrixVisualizer/Common/Zoom.hpp +++ b/plugins/MatrixVisualizer/Common/Zoom.hpp @@ -1,7 +1,7 @@ #ifndef ZOOM_HPP #define ZOOM_HPP -#include <QtOpenGL/QtOpenGL> +#include <QOpenGLFunctions> #include "../Formats/SymbolMatrix.hpp" @@ -14,7 +14,7 @@ class Zoom { public: /** * \brief The size of the color matrix - * + * */ static const int DEFAULT_LEVEL = 1024; @@ -37,7 +37,7 @@ public: * \brief Get the Color in x an y coordinates * \param x first coordinate * \param y second coordinate - * \return A color of type GLfloat + * \return A color of type GLfloat */ GLfloat getColor(int x, int y) const; @@ -54,15 +54,15 @@ public: protected: /** * \brief A pointer to the matrix to display - * + * */ symbol_matrix_t *m_matrix; /** * \brief The color matrix that is painted on the display - * + * */ GLfloat m_colors[DEFAULT_LEVEL][DEFAULT_LEVEL]; }; -#endif \ No newline at end of file +#endif diff --git a/plugins/MatrixVisualizer/MatrixVisualizer.hpp b/plugins/MatrixVisualizer/MatrixVisualizer.hpp index bc6dad892a7b1de65c00cc396492de4da9a0fbbd..1b7c8fd8306fe49e70f4793895eee6658a66a8f3 100644 --- a/plugins/MatrixVisualizer/MatrixVisualizer.hpp +++ b/plugins/MatrixVisualizer/MatrixVisualizer.hpp @@ -36,10 +36,10 @@ private: void connect_widgets(); void set_line_edit_defaults( QLineEdit *le, std::string name, std::string def_name ); -public slots: +public Q_SLOTS: void execute(); -private slots: +private Q_SLOTS: static void on_tool_button_symbol_clicked(); static void on_tool_button_order_clicked(); static void on_tool_button_values_clicked(); diff --git a/plugins/MatrixVisualizer/Windows/MatrixGLWidget.cpp b/plugins/MatrixVisualizer/Windows/MatrixGLWidget.cpp index fe83de0e1964a2f57a1a7e016f71e34f36044abc..4f68d36f4e51c1c1d54fce2999f104faa43f0f54 100644 --- a/plugins/MatrixVisualizer/Windows/MatrixGLWidget.cpp +++ b/plugins/MatrixVisualizer/Windows/MatrixGLWidget.cpp @@ -1,5 +1,7 @@ -#include "MatrixGLWidget.hpp" +#include "Common/Zooming.hpp" +#include "Common/Quadtree.hpp" +#include "MatrixGLWidget.hpp" #include "MatrixWindow.hpp" #define BACKGROUND_COLOR_R 0.9f diff --git a/plugins/MatrixVisualizer/Windows/MatrixGLWidget.hpp b/plugins/MatrixVisualizer/Windows/MatrixGLWidget.hpp index 4fe63446e803828856fa5ad59e915472f47b54c1..2d87cbbad786308836ebb6e266a3cdc2a8f73445 100644 --- a/plugins/MatrixVisualizer/Windows/MatrixGLWidget.hpp +++ b/plugins/MatrixVisualizer/Windows/MatrixGLWidget.hpp @@ -3,7 +3,8 @@ #include "Configuration.hpp" -#include <QtOpenGL/QtOpenGL> +#include <QLabel> +#include <QElapsedTimer> #include <QOpenGLFunctions> #include <QOpenGLWidget> @@ -11,10 +12,7 @@ #include <stack> -#include "../Formats/SymbolMatrix.hpp" -#include "../Common/Zooming.hpp" -#include "../Common/Quadtree.hpp" -#include "../Common/Zoom.hpp" +class Zoom; class MatrixGLWidget : public QOpenGLWidget, protected QOpenGLFunctions diff --git a/plugins/TraceInfos/TraceInfos.hpp b/plugins/TraceInfos/TraceInfos.hpp index 15bde7101342505ed91f565fcd2f6f0fe15eedb0..172ad551cd6c24658ab0a5b0f4a1c82fbb0711ec 100644 --- a/plugins/TraceInfos/TraceInfos.hpp +++ b/plugins/TraceInfos/TraceInfos.hpp @@ -25,7 +25,7 @@ public: void set_arguments(std::map<std::string /*argname*/, QVariant */*argValue*/>); std::string get_name(); -public slots: +public Q_SLOTS: void execute(); }; diff --git a/src/common/Memory.cpp b/src/common/Memory.cpp index 7d65fc3ca39749770d7d852b0d98778b72c5c3ea..a78232496b4241086cf23300108e14f6812b00c6 100644 --- a/src/common/Memory.cpp +++ b/src/common/Memory.cpp @@ -222,7 +222,7 @@ void memAllocTraceReset () { !NULL - pointer to memory block. NULL - no array allocated. */ -void *operator new(std::size_t size) throw(std::bad_alloc) +void *operator new(std::size_t size) { double * memptr; diff --git a/src/common/Memory.hpp b/src/common/Memory.hpp index c2260a0d2daaf76a284af1aa26580a3edd019836..1103f86ab321f5ce0cfc4bb6c3fc34cf16c84e51 100644 --- a/src/common/Memory.hpp +++ b/src/common/Memory.hpp @@ -171,7 +171,7 @@ extern "C" { !NULL - pointer to memory block. NULL - no array allocated. */ -void *operator new(std::size_t size) throw(std::bad_alloc); +void *operator new(std::size_t size); /* Function: operator new[] diff --git a/src/core/Core.cpp b/src/core/Core.cpp index 1e744598a90ae363e745b5c1c6d7ec868c1f3b23..f86430c4448ea63be5f45afd7a508e914500cb35 100644 --- a/src/core/Core.cpp +++ b/src/core/Core.cpp @@ -538,7 +538,7 @@ bool Core::draw_trace(const string & filename, const int format) { time_elapsed.start(); buf_txt.str(""); bool parsing_finished=false; - emit run_parsing(); + Q_EMIT run_parsing(); while( !parsing_finished && !killed) { @@ -560,11 +560,11 @@ bool Core::draw_trace(const string & filename, const int format) { QMutexLocker locker(_mutex); if(format != _STATE_SPLITTING) { - emit build_finished(true); + Q_EMIT build_finished(true); } else{ #if defined(USE_ITC) && defined(BOOST_SERIALIZE) - emit dump(Info::Splitter::path, Info::Splitter::filename); + Q_EMIT dump(Info::Splitter::path, Info::Splitter::filename); #elif defined(USE_ITC) *Message::get_instance() << QObject::tr("Splitting was asked but BOOST_SERIALIZE flag was not set ").toStdString() << Message::ende; @@ -612,7 +612,7 @@ bool Core::draw_trace(const string & filename, const int format) { *Message::get_instance() << QObject::tr("The trace opening was canceled by the user at ").toStdString() << loaded << "%" << Message::ende; //locks the mutex and automatically unlocks it when going out of scope - emit build_finished(true); + Q_EMIT build_finished(true); QMutexLocker locker(_mutex); _closed->wait(_mutex); break; // Quit the loop @@ -709,7 +709,7 @@ bool Core::draw_trace(const string & filename, const int format) { }else{ // *Message::get_instance() << "Parsing was not finished properly" << Message::ende; _is_window_displayed=false; - emit close_windows(); + Q_EMIT close_windows(); return false; } } @@ -840,8 +840,8 @@ void Core::launch_action(int state, void* arg) { parser->set_canceled(); //locks the mutex and automatically unlocks it when going out of scope QMutexLocker locker(_mutex); - emit build_finished(false); - emit close_windows(); + Q_EMIT build_finished(false); + Q_EMIT close_windows(); while(parser!=NULL) _closed->wait(_mutex,100); }*/ diff --git a/src/core/Core.hpp b/src/core/Core.hpp index 3188990df749581ada1355a88f673e6c11d6dc73..91e3fb7d9b2180c0841c1411658d7260b40d53a6 100644 --- a/src/core/Core.hpp +++ b/src/core/Core.hpp @@ -521,7 +521,7 @@ public: void reload_events(); //Qt signals fo the Parsing Thread -signals: +Q_SIGNALS: /*! *\brief run_parsing() diff --git a/src/interface/Interface_graphic.cpp b/src/interface/Interface_graphic.cpp index 145795f197acbdea798b80734c7a25c228f49bc4..95024f163f53076326d42100ff56dc2fa73ef991 100644 --- a/src/interface/Interface_graphic.cpp +++ b/src/interface/Interface_graphic.cpp @@ -1081,7 +1081,7 @@ void Interface_graphic::dropEvent(QDropEvent *event) { return ; } - foreach (QUrl url, event->mimeData()->urls()) { + for (QUrl url: event->mimeData()->urls()) { #ifdef WIN32 const QString filename = url.toString().right(url.toString().size()-8); #else diff --git a/src/interface/Interface_graphic.hpp b/src/interface/Interface_graphic.hpp index 80e6a9961e344d54d7a6cd31721b48fab1724dc8..5bc7eede487dc6489e52d823ba1406e9d44c65fa 100644 --- a/src/interface/Interface_graphic.hpp +++ b/src/interface/Interface_graphic.hpp @@ -510,7 +510,7 @@ public: -protected slots: +protected Q_SLOTS: diff --git a/src/interface/Interval_select.cpp b/src/interface/Interval_select.cpp index 88828501f6e89738fbe374ea89f995de33a6374d..c80ab1ce9ec811442bdcfa0c68a634efd67fba51 100644 --- a/src/interface/Interval_select.cpp +++ b/src/interface/Interval_select.cpp @@ -174,7 +174,7 @@ void Interval_select::minSpinBoxValueChanged( double value ) interval_slider->setLowerValue( int(position) ); interval_slider->blockSignals(v); - emit minValueChanged( minSpinBox->value() ); + Q_EMIT minValueChanged( minSpinBox->value() ); myPalette.setColor(QPalette::Active, QPalette::Text, Qt::black); myPalette.setColor(QPalette::Active, QPalette::HighlightedText, Qt::white); @@ -209,7 +209,7 @@ void Interval_select::maxSpinBoxValueChanged( double value ) interval_slider->setLowerValue( int(position) ); interval_slider->blockSignals(v); - emit maxValueChanged( maxSpinBox->value() ); + Q_EMIT maxValueChanged( maxSpinBox->value() ); myPalette.setColor(QPalette::Active, QPalette::Text, Qt::black); myPalette.setColor(QPalette::Active, QPalette::HighlightedText, Qt::white); @@ -237,7 +237,7 @@ void Interval_select::minSliderValueChanged( int _value ) bool v = minSpinBox->blockSignals(true); minSpinBox->setValue( _value *(_trace->get_max_date() - minSpinBox->minimum())/(interval_slider->maximum() - interval_slider->minimum())); minSpinBox->blockSignals(v); - emit minValueChanged( minSpinBox->value() ); + Q_EMIT minValueChanged( minSpinBox->value() ); if(_auto_refresh)apply_settings(); } _applied = false; @@ -250,7 +250,7 @@ void Interval_select::maxSliderValueChanged( int _value ) bool v = maxSpinBox->blockSignals(true); maxSpinBox->setValue( _value * (_trace->get_max_date() - maxSpinBox->minimum())/(interval_slider->maximum() - interval_slider->minimum())); maxSpinBox->blockSignals(v); - emit maxValueChanged( maxSpinBox->value() ); + Q_EMIT maxValueChanged( maxSpinBox->value() ); if(_auto_refresh)apply_settings(); } _applied = false; diff --git a/src/interface/Interval_select.hpp b/src/interface/Interval_select.hpp index 5e40d3a93117f5fea9792bcb680e9a6a1d2b1e25..75caba550a5775c244297f9a11fddf08393bec6f 100644 --- a/src/interface/Interval_select.hpp +++ b/src/interface/Interval_select.hpp @@ -113,23 +113,21 @@ public: void update_values(); - private slots: - void minSpinBoxValueChanged( double value ); - void minSliderValueChanged( int value ); - void maxSpinBoxValueChanged( double value ); - void maxSliderValueChanged( int value ); + private Q_SLOTS: + void minSpinBoxValueChanged( double value ); + void minSliderValueChanged( int value ); + void maxSpinBoxValueChanged( double value ); + void maxSliderValueChanged( int value ); void on_ok_button_clicked(); void on_cancel_button_clicked(); - void on_reset_button_clicked(); - void on_apply_button_clicked(); - void on_auto_refresh_box_stateChanged(); - -signals: - void minValueChanged( double value ); - void maxValueChanged( double value ); - + void on_reset_button_clicked(); + void on_apply_button_clicked(); + void on_auto_refresh_box_stateChanged(); +Q_SIGNALS: + void minValueChanged( double value ); + void maxValueChanged( double value ); }; #endif // INTERVAL_SELECT_HPP diff --git a/src/interface/Node_select.cpp b/src/interface/Node_select.cpp index 8bd23f7799e57bcd052e67086c8fe69cd07608d5..662659164bb35145b4adc7d7ac721d54d625220a 100644 --- a/src/interface/Node_select.cpp +++ b/src/interface/Node_select.cpp @@ -70,7 +70,9 @@ #include <QFileDialog> // To choose the file to save #include <QKeyEvent> #include <QDropEvent> -#include <QtXml> +#include <QDomDocument> +#include <QDomElement> +#include <QTextStream> #include <QFile> #include <iostream> diff --git a/src/interface/Node_select.hpp b/src/interface/Node_select.hpp index 9220a8ea387dae5e4ea04d068823c4477d326f9f..cd283c01aabf0fdc5b01d7f01e66dfe28543ad87 100644 --- a/src/interface/Node_select.hpp +++ b/src/interface/Node_select.hpp @@ -183,7 +183,7 @@ private: -private slots: +private Q_SLOTS: void on_reset_button_clicked(); void on_export_button_clicked(); diff --git a/src/interface/Settings_window.cpp b/src/interface/Settings_window.cpp index d525f6b1d6faf999d5b1a7656eb4b4ad741bac8b..7f40360f9f372cae6558b248c5fd56d02cb92022 100644 --- a/src/interface/Settings_window.cpp +++ b/src/interface/Settings_window.cpp @@ -636,7 +636,7 @@ Settings_window::on_btn_ok_clicked() if( _changed ) { // Catch by at least the interface_graphic which will dispatch it to the classes which needs - emit settings_changed(); + Q_EMIT settings_changed(); _c->launch_action(Core::_STATE_RENDER_UPDATE); } diff --git a/src/interface/Settings_window.hpp b/src/interface/Settings_window.hpp index 57421d7375b84bea9e8f5a6f96fc96f8d6c55d31..27056bf5ebea7e85bddb4d01f9c86d8269e57804 100644 --- a/src/interface/Settings_window.hpp +++ b/src/interface/Settings_window.hpp @@ -107,11 +107,11 @@ private: void fill_table( bool used=true ); void update_table_from_palette(const std::string &); -public slots: +public Q_SLOTS: void on_btn_apply_clicked(); void on_btn_cancel_clicked(); -private slots: +private Q_SLOTS: /*! * \fn item_changed(int row = -1) @@ -170,7 +170,7 @@ public: void show(); void refresh(); -public slots: +public Q_SLOTS: /*! * \fn on_tabWidget_currentChanged(int index) * \brief Called when the user changes the tab. @@ -179,7 +179,7 @@ public slots: */ void on_tabWidget_currentChanged(int index); -private slots: +private Q_SLOTS: /*! * \fn on_rm_dir_btn_clicked() @@ -216,7 +216,7 @@ private slots: void on_cb_noevents_stateChanged(int state); void on_cb_tip_currentIndexChanged(int index); -signals: +Q_SIGNALS: void settings_changed(); }; diff --git a/src/interface/qxtspanslider.cpp b/src/interface/qxtspanslider.cpp index d1992805191759e5947c9e17bd4889c1c8a32984..c12b36a434b5daf4e224b7a21731f73485487b09 100644 --- a/src/interface/qxtspanslider.cpp +++ b/src/interface/qxtspanslider.cpp @@ -81,7 +81,7 @@ void QxtSpanSliderPrivate::handleMousePress(const QPoint& pos, QStyle::SubContro offset = pick(pos - sr.topLeft()); lastPressed = handle; p->setSliderDown(true); - emit p->sliderPressed(handle); + Q_EMIT p->sliderPressed(handle); } if (control != oldControl) p->update(sr); @@ -459,15 +459,15 @@ void QxtSpanSlider::setSpan(int lower, int upper) { qxt_d().lower = low; qxt_d().lowerPos = low; - emit lowerValueChanged(low); + Q_EMIT lowerValueChanged(low); } if (upp != qxt_d().upper) { qxt_d().upper = upp; qxt_d().upperPos = upp; - emit upperValueChanged(upp); + Q_EMIT upperValueChanged(upp); } - emit spanChanged(qxt_d().lower, qxt_d().upper); + Q_EMIT spanChanged(qxt_d().lower, qxt_d().upper); update(); } } @@ -489,7 +489,7 @@ void QxtSpanSlider::setLowerPosition(int lower) if (!hasTracking()) update(); if (isSliderDown()) - emit lowerPositionChanged(lower); + Q_EMIT lowerPositionChanged(lower); if (hasTracking() && !qxt_d().blockTracking) { bool main = (qxt_d().mainControl == QxtSpanSlider::LowerHandle); @@ -515,7 +515,7 @@ void QxtSpanSlider::setUpperPosition(int upper) if (!hasTracking()) update(); if (isSliderDown()) - emit upperPositionChanged(upper); + Q_EMIT upperPositionChanged(upper); if (hasTracking() && !qxt_d().blockTracking) { bool main = (qxt_d().mainControl == QxtSpanSlider::UpperHandle); diff --git a/src/interface/viteqtreewidget.cpp b/src/interface/viteqtreewidget.cpp index e9758d184a8f268a92898fb9f767fbaab4383681..538256a1a20b569f1d1766f5b24b458ea49f7c18 100644 --- a/src/interface/viteqtreewidget.cpp +++ b/src/interface/viteqtreewidget.cpp @@ -35,7 +35,7 @@ void viteQTreeWidget::dropEvent(QDropEvent *e){ // this is used to determine if the target is itself a child - foreach(QTreeWidgetItem* item, selected_items) + for(QTreeWidgetItem* item: selected_items) { // if target and item don't share the same parent... @@ -75,7 +75,7 @@ void viteQTreeWidget::dropEvent(QDropEvent *e){ initial_count=topLevelItemCount(); //we want to insert below the pointed event - foreach(QTreeWidgetItem* item, selected_items) + for(QTreeWidgetItem* item: selected_items) { //remove all items from their parent @@ -99,7 +99,7 @@ void viteQTreeWidget::dropEvent(QDropEvent *e){ if(target->parent()){ if(index+modifier > target->parent()->childCount()){ max=target->parent()->childCount(); - foreach(QTreeWidgetItem* item, selected_items) + for(QTreeWidgetItem* item: selected_items) { target->parent()->insertChild(max, item); max++; @@ -111,7 +111,7 @@ void viteQTreeWidget::dropEvent(QDropEvent *e){ }else{ if(index+modifier > topLevelItemCount()){ max=topLevelItemCount(); - foreach(QTreeWidgetItem* item, selected_items) + for(QTreeWidgetItem* item: selected_items) { insertTopLevelItem(max, item); max++; @@ -132,7 +132,7 @@ void viteQTreeWidget::dropEvent(QDropEvent *e){ if (count!=initial_count){ //prevent loss of elements if insertions failed (can happen sometimes) //try to reinsert all elements at the end - foreach(QTreeWidgetItem* item, selected_items) + for(QTreeWidgetItem* item: selected_items) { if(target->parent()) target->parent()->insertChild(target->parent()->childCount(), item); diff --git a/src/main.cpp b/src/main.cpp index 000e7cb28a0342f9a12d49b40f78fd93061d435b..0353beee886f0c0b2d94efbdbfa13d56d82a1549 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -91,6 +91,9 @@ int main(int argc, char **argv) { Q_INIT_RESOURCE(vite); +#if QT_VERSION >= 0x050400 + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); +#endif Info::Render::_key_alt = false;/* no CTRL key pushed */ #ifdef VITE_DBG_MEMORY_TRACE diff --git a/src/parser/OTF2Parser/ParserDefinitionOTF2.cpp b/src/parser/OTF2Parser/ParserDefinitionOTF2.cpp index e54a4d624e3440adefd0cbc244ea86919a06bd78..33c28a562d866c6f41a92311bc81217ace4309f5 100644 --- a/src/parser/OTF2Parser/ParserDefinitionOTF2.cpp +++ b/src/parser/OTF2Parser/ParserDefinitionOTF2.cpp @@ -163,8 +163,11 @@ void ParserDefinitionOTF2::set_handlers(Trace *t) { * All the definition handlers */ -OTF2_CallbackCode ParserDefinitionOTF2::handler_DefTimerResolution(void *, uint64_t timer_resolution, uint64_t /*global_offset*/, uint64_t /*trace_length*/) -{ +#if OTF2_VERSION_MAJOR >= 3 +OTF2_CallbackCode ParserDefinitionOTF2::handler_DefTimerResolution(void *, uint64_t timer_resolution, uint64_t /*global_offset*/, uint64_t /*trace_length*/, uint64_t /*realtimeTimestamp*/) { +#else +OTF2_CallbackCode ParserDefinitionOTF2::handler_DefTimerResolution(void *, uint64_t timer_resolution, uint64_t /*global_offset*/, uint64_t /*trace_length*/) { +#endif ParserDefinitionOTF2::_ticks_per_second = timer_resolution; return OTF2_CALLBACK_SUCCESS; } @@ -215,11 +218,20 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefSystemTreeNode(void * return OTF2_CALLBACK_SUCCESS; } +#if OTF2_VERSION_MAJOR >= 3 +OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocationGroup(void */*userdata*/, + OTF2_LocationGroupRef location_group_identifier, + OTF2_StringRef name, + OTF2_LocationGroupType /*type*/, + OTF2_SystemTreeNodeRef system_tree_parent, + OTF2_LocationGroupRef creatingLocationGroup) { +#else OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocationGroup(void */*userdata*/, OTF2_LocationGroupRef location_group_identifier, OTF2_StringRef name, OTF2_LocationGroupType /*type*/, OTF2_SystemTreeNodeRef system_tree_parent) { +#endif OTF2_LocationGroup *temp = new OTF2_LocationGroup(); temp->_group_id = location_group_identifier; temp->_name_id = name; @@ -358,12 +370,20 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefGroup(void * /*userD } +#if OTF2_VERSION_MAJOR >= 3 OTF2_CallbackCode ParserDefinitionOTF2::handler_DefComm(void * /*userData*/, OTF2_CommRef self, OTF2_StringRef name, OTF2_GroupRef group, - OTF2_CommRef parent) -{ + OTF2_CommRef parent, + OTF2_CommFlag flags) { +#else +OTF2_CallbackCode ParserDefinitionOTF2::handler_DefComm(void * /*userData*/, + OTF2_CommRef self, + OTF2_StringRef name, + OTF2_GroupRef group, + OTF2_CommRef parent) { +#endif // defines an MPI communicator struct OTF2_Comm* c = new struct OTF2_Comm(); c->_id = self; diff --git a/src/parser/OTF2Parser/ParserDefinitionOTF2.hpp b/src/parser/OTF2Parser/ParserDefinitionOTF2.hpp index f7d76c352c530477898b09feed37bfcf3517c45b..d340e20c04eb03fa6cd4c34ecfddb4455f6631a6 100644 --- a/src/parser/OTF2Parser/ParserDefinitionOTF2.hpp +++ b/src/parser/OTF2Parser/ParserDefinitionOTF2.hpp @@ -236,7 +236,12 @@ private: */ static std::vector<Color *> _default_colors; +#if OTF2_VERSION_MAJOR >= 3 + static OTF2_CallbackCode handler_DefTimerResolution(void *, uint64_t, uint64_t, uint64_t, uint64_t); +#else static OTF2_CallbackCode handler_DefTimerResolution(void *, uint64_t, uint64_t, uint64_t); +#endif + static OTF2_CallbackCode handler_DefString(void *, OTF2_StringRef, const char *); // System tree callback @@ -246,11 +251,21 @@ private: OTF2_StringRef class_id, OTF2_SystemTreeNodeRef parent_node_id); +#if OTF2_VERSION_MAJOR >= 3 + static OTF2_CallbackCode handler_DefLocationGroup(void */*userdata*/, + OTF2_LocationGroupRef location_group_identifier, + OTF2_StringRef name, + OTF2_LocationGroupType type, + OTF2_SystemTreeNodeRef system_tree_parent, + OTF2_LocationGroupRef creatingLocationGroup); +#else static OTF2_CallbackCode handler_DefLocationGroup(void */*userdata*/, OTF2_LocationGroupRef location_group_identifier, OTF2_StringRef name, OTF2_LocationGroupType type, OTF2_SystemTreeNodeRef system_tree_parent); +#endif + static OTF2_CallbackCode handler_DefLocation(void *userData, OTF2_LocationRef locationIdentifier, OTF2_StringRef name_id, @@ -271,12 +286,22 @@ private: uint32_t numberOfMembers, const uint64_t *members); +#if OTF2_VERSION_MAJOR >= 3 static OTF2_CallbackCode handler_DefComm(void * userData, OTF2_CommRef self, OTF2_StringRef name, OTF2_GroupRef group, - OTF2_CommRef parent); - + OTF2_CommRef parent, + OTF2_CommFlag flags + ); +#else + static OTF2_CallbackCode handler_DefComm(void * userData, + OTF2_CommRef self, + OTF2_StringRef name, + OTF2_GroupRef group, + OTF2_CommRef parent + ); +#endif static OTF2_CallbackCode handler_DefMetricMember( void* userData, OTF2_MetricMemberRef self, diff --git a/src/parser/OTFParser/OTFTraceBuilderThread.hpp b/src/parser/OTFParser/OTFTraceBuilderThread.hpp index c9a47a0f920fcc37ca712e6d06a7c6f9a08be80d..49f080d22eb60ad618964a718183f7c45585f38c 100644 --- a/src/parser/OTFParser/OTFTraceBuilderThread.hpp +++ b/src/parser/OTFParser/OTFTraceBuilderThread.hpp @@ -162,7 +162,7 @@ private: -public slots: +public Q_SLOTS: void build_trace(int n, OTF_Trace_builder_struct* tb_struct); void build_finished(); diff --git a/src/parser/OTFParser/ParserDefinitionOTF.cpp b/src/parser/OTFParser/ParserDefinitionOTF.cpp index f027123ad0b1a7efb2c104ec71f645baa4c98d74..d277b20ed832cf47129e5dfbbf8fe151dd2163dc 100644 --- a/src/parser/OTFParser/ParserDefinitionOTF.cpp +++ b/src/parser/OTFParser/ParserDefinitionOTF.cpp @@ -127,7 +127,7 @@ ParserDefinitionOTF::~ParserDefinitionOTF() { // Free the memory used by the colors const size_t nb_colors = _default_colors.size(); - for(int i = 0 ; i < nb_colors ; ++ i) { + for(size_t i = 0 ; i < nb_colors ; ++ i) { delete _default_colors[i]; _default_colors[i] = NULL; } @@ -423,11 +423,10 @@ ProcessGroup ParserDefinitionOTF::get_processgroup_by_id(const uint32_t id) ProcessGroup ParserDefinitionOTF::get_processgroup_by_process(const unsigned int process_id) { map<uint32_t, ProcessGroup>::const_iterator it, end; - int i; end = _process_group.end(); for ( it = _process_group.begin() ; it != end; ++ it) { ProcessGroup proc_group_temp = (*it).second; - for(i=0; i < proc_group_temp._numberOfProcs; i++) { + for(uint32_t i=0; i < proc_group_temp._numberOfProcs; i++) { if(proc_group_temp._procs[i] == process_id) { return proc_group_temp; } diff --git a/src/parser/OTFParser/mt_ParserEventOTF.cpp b/src/parser/OTFParser/mt_ParserEventOTF.cpp index b8cd8a5273ed47e533a35e673d1e2599a16c9990..d39473e9dba06f068a504d7938ec7025937acb41 100644 --- a/src/parser/OTFParser/mt_ParserEventOTF.cpp +++ b/src/parser/OTFParser/mt_ParserEventOTF.cpp @@ -135,7 +135,7 @@ int mt_ParserEventOTF::handler_BeginProcess( void* trace, _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_begin_process; _n_read++; - //emit my_address->signal_handler_begin_process(trace,time,process); + //Q_EMIT my_address->signal_handler_begin_process(trace,time,process); return OTF_RETURN_OK; } @@ -151,7 +151,7 @@ int mt_ParserEventOTF::handler_EndProcess( void* userData, _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_end_process; _n_read++; - //emit my_address->signal_handler_end_process (trace,time, proc_id); + //Q_EMIT my_address->signal_handler_end_process (trace,time, proc_id); return OTF_RETURN_OK; } @@ -169,7 +169,7 @@ int mt_ParserEventOTF::handler_Enter( void* userData, _tb_struct[_n_read].process2=proc_id; _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_enter; _n_read++; - // emit my_address->signal_handler_enter(trace, time, func_id,proc_id,0); + // Q_EMIT my_address->signal_handler_enter(trace, time, func_id,proc_id,0); return OTF_RETURN_OK; } @@ -197,7 +197,7 @@ int mt_ParserEventOTF::handler_Counter( void* userData, _tb_struct[_n_read].value=value; _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_counter; _n_read++; - // emit my_address->signal_handler_counter(trace, time, proc_id,counter_id,value); + // Q_EMIT my_address->signal_handler_counter(trace, time, proc_id,counter_id,value); return OTF_RETURN_OK; } @@ -215,7 +215,7 @@ int mt_ParserEventOTF::handler_DefMarker(void *, _tb_struct[_n_read].type=type; _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_defmarker; _n_read++; - //emit my_address->signal_handler_defmarker(NULL, stream, id,name,type); + //Q_EMIT my_address->signal_handler_defmarker(NULL, stream, id,name,type); return OTF_RETURN_OK; } @@ -234,7 +234,7 @@ int mt_ParserEventOTF::handler_Marker(void *userData, _tb_struct[_n_read].text=text; _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_marker; _n_read++; - // emit my_address->signal_handler_marker(trace, time, proc_id,id,text); + // Q_EMIT my_address->signal_handler_marker(trace, time, proc_id,id,text); return OTF_RETURN_OK; } @@ -259,7 +259,7 @@ int mt_ParserEventOTF::handler_SendMsg( void* userData, _tb_struct[_n_read].source=source; _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_send_message; _n_read++; -//emit my_address->signal_handler_send_message(trace, time, sender, receiver, group, type,length, source); +//Q_EMIT my_address->signal_handler_send_message(trace, time, sender, receiver, group, type,length, source); return OTF_RETURN_OK; } @@ -283,7 +283,7 @@ int mt_ParserEventOTF::handler_RecvMsg( void* userData, _tb_struct[_n_read].source=source; _tb_struct[_n_read].func=OTFTraceBuilderThread::handler_receive_message; _n_read++; -//emit my_address->signal_handler_receive_message(trace, time, receiver, sender, group, type,length, source); +//Q_EMIT my_address->signal_handler_receive_message(trace, time, receiver, sender, group, type,length, source); return OTF_RETURN_OK; } diff --git a/src/parser/OTFParser/mt_ParserOTF.cpp b/src/parser/OTFParser/mt_ParserOTF.cpp index 5a1dd8c3e04d9b3b291dd1b82854ce02bef49230..956e354813eecbc85756c9c53bfa99b41e41b524 100644 --- a/src/parser/OTFParser/mt_ParserOTF.cpp +++ b/src/parser/OTFParser/mt_ParserOTF.cpp @@ -152,13 +152,13 @@ void mt_ParserOTF::parse(Trace &trace, break; } freeSlots.acquire(); //do not produce too fast (5 blocks max at a time) - emit(build_trace(n_read, tb_structs)); + Q_EMIT build_trace(n_read, tb_structs); linesProduced.release(); tb_structs = new OTF_Trace_builder_struct[n_events]; } freeSlots.acquire(); //do not produce too fast (5 blocks max at a time) - emit(build_trace(n_read, tb_structs)); + Q_EMIT build_trace(n_read, tb_structs); linesProduced.release(); //tb_structs= NULL; @@ -168,13 +168,13 @@ void mt_ParserOTF::parse(Trace &trace, && (!_is_canceled)) { freeSlots.acquire(); //do not produce too fast (5 blocks max at a time) - emit(build_trace(n_read, tb_structs)); + Q_EMIT build_trace(n_read, tb_structs); linesProduced.release(); tb_structs= new OTF_Trace_builder_struct[n_events]; } freeSlots.acquire(); //do not produce too fast (5 blocks max at a time) - emit(build_trace(n_read, tb_structs)); + Q_EMIT build_trace(n_read, tb_structs); linesProduced.release(); finish(); @@ -184,7 +184,7 @@ void mt_ParserOTF::parse(Trace &trace, } QMutexLocker locker(&mutex); - emit build_finished(); + Q_EMIT build_finished(); ended.wait(&mutex); locker.unlock(); traceThread.quit(); diff --git a/src/parser/OTFParser/mt_ParserOTF.hpp b/src/parser/OTFParser/mt_ParserOTF.hpp index 968d795206c2895fb655a2bd71e44769356dfa2f..2a452f4e4cb8d0161f0c2d29d6c01a449d550813 100644 --- a/src/parser/OTFParser/mt_ParserOTF.hpp +++ b/src/parser/OTFParser/mt_ParserOTF.hpp @@ -55,7 +55,6 @@ #ifndef mt_ParserOTF_HPP #define mt_ParserOTF_HPP -#include <QtCore> #include <parser/Parser.hpp> #include <otf.h> class mt_ParserEventOTF; @@ -69,7 +68,7 @@ struct OTF_Trace_builder_struct; * */ class mt_ParserOTF : public Parser { - + Q_OBJECT private: OTF_Reader* _reader; @@ -89,7 +88,7 @@ public: * \param trace : the structure of data to fill * \param finish_trace_after_parse boolean set if we do not have to finish the trace after parsing */ - void parse(Trace &trace, + void parse(Trace &trace, bool finish_trace_after_parse = true); /*! @@ -108,10 +107,10 @@ public: * \return the scale of the size already loaded of the file by the parser. (between 0 and 1) */ float get_percent_loaded() const; - - signals: + + Q_SIGNALS: void build_finished(); - void build_trace(int, OTF_Trace_builder_struct*); + void build_trace(int, OTF_Trace_builder_struct*); }; diff --git a/src/parser/PajeParser/BuilderThread.cpp b/src/parser/PajeParser/BuilderThread.cpp index 5870fbe63231474b909d2a23e6de484635c81a8b..1b191fd8e85da1219f87697c965fc6d97d402d31 100644 --- a/src/parser/PajeParser/BuilderThread.cpp +++ b/src/parser/PajeParser/BuilderThread.cpp @@ -87,7 +87,7 @@ void BuilderThread::run(int n, PajeLine* line) { n_without_errors++; free(line[j]._tokens); // release tokens allocated in the PajeFileManager } - emit(build_trace(n_without_errors, tb_structs)); + Q_EMIT build_trace(n_without_errors, tb_structs); _linesProduced->release(); free(line); } @@ -98,7 +98,7 @@ void BuilderThread::finish_build() { //finish the TraceBuilderThread before closing this one //locks the mutex and automatically unlocks it when going out of scope QMutexLocker locker2(_mutex2); - emit build_finished(); + Q_EMIT build_finished(); _trace_cond->wait(_mutex2); locker2.unlock(); diff --git a/src/parser/PajeParser/BuilderThread.hpp b/src/parser/PajeParser/BuilderThread.hpp index 9a743cf7db4de82edf58137d5695cbef4e9cc7f1..93d15269e1ae8efcb3dc6e81b35ef6b96e539435 100644 --- a/src/parser/PajeParser/BuilderThread.hpp +++ b/src/parser/PajeParser/BuilderThread.hpp @@ -59,7 +59,6 @@ struct Trace_builder_struct; * \class ParsingThread * \brief Thread to parse asynchronously a trace with any parser available */ -#include <QtCore> class BuilderThread : public QObject { Q_OBJECT @@ -91,7 +90,7 @@ public: bool is_finished(); -public slots: +public Q_SLOTS: void finish_build(); /*! @@ -100,7 +99,7 @@ public slots: */ void run(int n, PajeLine* line); -signals: +Q_SIGNALS: void build_finished(); void build_trace(int, Trace_builder_struct*); }; diff --git a/src/parser/PajeParser/mt_ParserEventPaje.hpp b/src/parser/PajeParser/mt_ParserEventPaje.hpp index e56645721fb9614f36f8159a5de06cd2bfd571b3..bde3e2a8d8fab2bf1dfca906a3b1202575263f27 100644 --- a/src/parser/PajeParser/mt_ParserEventPaje.hpp +++ b/src/parser/PajeParser/mt_ParserEventPaje.hpp @@ -108,7 +108,7 @@ public: int store_event(const PajeLine_t *line, Trace &trace, Trace_builder_struct* tb_struct); -signals: +Q_SIGNALS: void build_trace(int n, Trace_builder_struct* tb_struct); }; diff --git a/src/parser/PajeParser/mt_ParserPaje.cpp b/src/parser/PajeParser/mt_ParserPaje.cpp index 222ce6336e2566e973096a2a1ce599ab17957c3a..2e4f24be65f247dde4a91de2638fd52fd61e7d24 100644 --- a/src/parser/PajeParser/mt_ParserPaje.cpp +++ b/src/parser/PajeParser/mt_ParserPaje.cpp @@ -228,7 +228,7 @@ void mt_ParserPaje::parse(Trace &trace, if(i==10000){//we finished to build a block, send it to the BuilderThread linesProduced.acquire(); - emit produced(i, line); + Q_EMIT produced(i, line); i=0; line=(PajeLine*)calloc(10000,sizeof(PajeLine)); @@ -245,14 +245,14 @@ void mt_ParserPaje::parse(Trace &trace, } } //send the last batch - emit produced(i, line); + Q_EMIT produced(i, line); line = NULL; //send the finish signal to the BuilderThread, which will do the same to the TraceBuilderThread //both threads will then be finished and ready to destroy //locks the mutex and automatically unlocks it when going out of scope QMutexLocker locker(&mutex); - emit build_finish(); + Q_EMIT build_finish(); ended.wait(&mutex); locker.unlock(); diff --git a/src/parser/PajeParser/mt_ParserPaje.hpp b/src/parser/PajeParser/mt_ParserPaje.hpp index e6472027c7ee7392344cc1921dff06bff284aed3..916ed05c844f08f77e9b6b0b94ea12bb8506b42b 100644 --- a/src/parser/PajeParser/mt_ParserPaje.hpp +++ b/src/parser/PajeParser/mt_ParserPaje.hpp @@ -49,7 +49,6 @@ #define MT_PARSERPAJE_HPP #include <cstdio> -#include <QtCore> #include <parser/Parser.hpp> #include <parser/PajeParser/mt_PajeFileManager.hpp> @@ -66,7 +65,7 @@ class mt_PajeFileManager; * */ class mt_ParserPaje : public Parser{ - + Q_OBJECT private: ParserDefinitionPaje *_ParserDefinition; @@ -92,7 +91,7 @@ public: * \param trace : the structure of data to fill * \param finish_trace_after_parse boolean set if we do not have to finish the trace after parsing */ - void parse(Trace &trace, + void parse(Trace &trace, bool finish_trace_after_parse = true) override; void releasefile(); @@ -104,7 +103,7 @@ public: float get_percent_loaded() const override; - signals: + Q_SIGNALS: void produced(int i, PajeLine* line); void build_finish(); diff --git a/src/parser/ParserSplitted.hpp b/src/parser/ParserSplitted.hpp index 74c97a689ab8048ca50ec380bdeadcfa42536edc..df67986c1644b059fbb879038617429f8e3a672b 100644 --- a/src/parser/ParserSplitted.hpp +++ b/src/parser/ParserSplitted.hpp @@ -104,7 +104,7 @@ public: */ ParserDefinitionPaje *get_parser_def() const; -signals: +Q_SIGNALS: void produced(int i, PajeLine* line); void build_finish(); }; diff --git a/src/parser/ParsingThread.hpp b/src/parser/ParsingThread.hpp index 5e5bdf67ee56661ce9459feb72197910ef0149f4..da10892fc0bc737a398f13f5a2651ab237c88613 100644 --- a/src/parser/ParsingThread.hpp +++ b/src/parser/ParsingThread.hpp @@ -90,7 +90,7 @@ public: */ bool is_killed(); -protected slots: +protected Q_SLOTS: /*! * \fn run() * \brief run the thread. diff --git a/src/parser/TauParser/ParserTau.cpp b/src/parser/TauParser/ParserTau.cpp index 64c4ee1404a912fae9b4ce8ee5b53cba18923fb7..e4bf2d93a761e26f0bb360f0bf16261449709f04 100644 --- a/src/parser/TauParser/ParserTau.cpp +++ b/src/parser/TauParser/ParserTau.cpp @@ -101,7 +101,7 @@ ParserTau::ParserTau(const std::string &filename) : Parser(filename) { ParserTau::~ParserTau() { // Free the memory used by the colors const size_t nb_colors = _default_colors.size(); - for(int i = 0 ; i < nb_colors ; ++ i) { + for(size_t i = 0 ; i < nb_colors ; ++ i) { delete _default_colors[i]; _default_colors[i] = NULL; } diff --git a/src/plugin/Command_window.hpp b/src/plugin/Command_window.hpp index 56a67df767bccc0ae28ddf68e0ada706168aa1f8..61a0fa577be7646745d8ace45916c33417b154fb 100644 --- a/src/plugin/Command_window.hpp +++ b/src/plugin/Command_window.hpp @@ -85,7 +85,7 @@ public : void init_window(); void set_trace(Trace * t); -private slots : +private Q_SLOTS: void on_execute_button_clicked(); }; diff --git a/src/plugin/Plugin_window.hpp b/src/plugin/Plugin_window.hpp index 23823dcf033499c1797b25bd246e636791faf353..a3a4e87fd74b6f7ca862f8914457d4c7f92e6bb7 100644 --- a/src/plugin/Plugin_window.hpp +++ b/src/plugin/Plugin_window.hpp @@ -141,7 +141,7 @@ private: */ void add_plugin(Plugin *plug); -public slots: +public Q_SLOTS: /*! * \fn reload_plugin(int index) * \brief Reload the trace of the index-th plugin diff --git a/src/render/opengl/Render_opengl.hpp b/src/render/opengl/Render_opengl.hpp index d824345aeb1bb68f7772162c5f2436557d64bcc7..08f854cee9b9cc03a72790066f6a88d9b7d50ca2 100644 --- a/src/render/opengl/Render_opengl.hpp +++ b/src/render/opengl/Render_opengl.hpp @@ -427,7 +427,7 @@ public: // void set_vertical_line(int l){} // void draw_vertical_line(); -public slots: +public Q_SLOTS: /*! * \brief slot connected to the simple click event */ diff --git a/src/render/vbo/Render_alternate.hpp b/src/render/vbo/Render_alternate.hpp index 3142cb10567aa03575b791ebabe147aa34d2ac18..37a434ae3bc16dda4060442b74387b25e7d8745b 100644 --- a/src/render/vbo/Render_alternate.hpp +++ b/src/render/vbo/Render_alternate.hpp @@ -566,7 +566,7 @@ public: void update_ev_couple( EntityValue *ev, std::map<EntityValue*, std::pair<Vbo*, Vbo*> > *evmap, bool shaded ); -public slots: +public Q_SLOTS: /*! * \brief slot connected to the simple click event */ diff --git a/src/statistics/ChartView.cpp b/src/statistics/ChartView.cpp index 22ee2399d030948b416b3d72772c46e2ce51b311..9277039ee52c905675c7e67a4ebaf4091c326af6 100644 --- a/src/statistics/ChartView.cpp +++ b/src/statistics/ChartView.cpp @@ -138,5 +138,5 @@ void Chart_View::on_y_scroll_changed(int x) { } void Chart_View::focusInEvent(QFocusEvent* event) { - emit chart_focused(); + Q_EMIT chart_focused(); } diff --git a/src/statistics/ChartView.hpp b/src/statistics/ChartView.hpp index f70ecb6b1738ed5cbf16833294ccca870b2e1643..e641b63e8a5ebc7b40b775b28efcdf763a215f5f 100644 --- a/src/statistics/ChartView.hpp +++ b/src/statistics/ChartView.hpp @@ -32,7 +32,7 @@ public: void reset_scroll_zoom(); -signals: +Q_SIGNALS: void chart_focused(); protected: @@ -41,7 +41,7 @@ protected: void wheelEvent(QWheelEvent* event); void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); -public slots: +public Q_SLOTS: void on_x_scroll_changed(int x); void on_y_scroll_changed(int x); }; \ No newline at end of file diff --git a/src/statistics/Statistics_window.cpp b/src/statistics/Statistics_window.cpp index 269b3d92816b3b516a0922eb224a4e1c86577ba0..f75f4b2e9cd078f43d83179face045c798802d77 100644 --- a/src/statistics/Statistics_window.cpp +++ b/src/statistics/Statistics_window.cpp @@ -12,6 +12,7 @@ #include <QFileDialog> // To choose the file to save #include <QKeyEvent> #include <QGLWidget> +#include <QGraphicsLayout> /* -- */ #include "common/common.hpp" #include "common/Info.hpp" diff --git a/src/statistics/Statistics_window.hpp b/src/statistics/Statistics_window.hpp index 3fd7336df73d45274cc58e7a53e72fe7aaa2d21f..7cae53c1c7cfa6320f82f29b257e743d2b416343 100644 --- a/src/statistics/Statistics_window.hpp +++ b/src/statistics/Statistics_window.hpp @@ -61,7 +61,7 @@ #include <QtWidgets/qtreewidget.h> #include <QtCharts/qchart.h> #include <QChartView> -#include <QtCharts> +#include <QtCharts/chartsnamespace.h> // this one is needed else QChart is not found #include "ChartView.hpp" @@ -160,10 +160,10 @@ private: */ void set_selected_nodes(const std::string &); -public slots: +public Q_SLOTS: void auto_update_stats(); -private slots: +private Q_SLOTS: void on_auto_reload_box_stateChanged(int); void on_want_stacked_stateChanged(int); diff --git a/src/trace/Container.hpp b/src/trace/Container.hpp index 56c9cdbc3415be6305c2df52794426f385ae0dbc..c0ef590c877ea32e5bd5fdf7c02ea66d4099c466 100644 --- a/src/trace/Container.hpp +++ b/src/trace/Container.hpp @@ -432,7 +432,7 @@ public: */ int get_depth(); //#if defined(USE_ITC) && defined(BOOST_SERIALIZE) - // signals: + // Q_SIGNALS: // // void dump_on_disk(IntervalOfContainer*,const char*); // void build_finish(); diff --git a/src/trace/EntityValue.cpp b/src/trace/EntityValue.cpp index 45e741fd5e093bc1ff448c12347ffb4899e5c190..0da6227ca1f3631427d0a5ed18fee7ece9a0ac0a 100644 --- a/src/trace/EntityValue.cpp +++ b/src/trace/EntityValue.cpp @@ -182,7 +182,7 @@ EntityValue::set_used_color(Color *c) } _usedcolor = c; - emit changedColor( this ); + Q_EMIT changedColor( this ); } void @@ -190,7 +190,7 @@ EntityValue::set_visible(bool b) { if ( _visible != b ) { _visible = b; - emit changedVisible( this ); + Q_EMIT changedVisible( this ); } } diff --git a/src/trace/EntityValue.hpp b/src/trace/EntityValue.hpp index 1fba366df5e136027441f5ea8fb442940389d484..add711e3ae0744b921f53c82830b856d84465953 100644 --- a/src/trace/EntityValue.hpp +++ b/src/trace/EntityValue.hpp @@ -111,7 +111,7 @@ public: void reload_file_color(); -signals: +Q_SIGNALS: void changedColor( EntityValue * ); void changedVisible( EntityValue * ); }; diff --git a/src/trace/SerializerDispatcher.cpp b/src/trace/SerializerDispatcher.cpp index 70cf178eee9c510f758191b2ca2d2abac4754e67..73aeecd5930f3d08eab470320a269c1d39f9fdaa 100644 --- a/src/trace/SerializerDispatcher.cpp +++ b/src/trace/SerializerDispatcher.cpp @@ -80,7 +80,7 @@ void SerializerDispatcher::kill_all_threads(){ SLOT(finish_build())); //locks the mutex and automatically unlocks it when going out of scope QMutexLocker locker(_mutex); - emit build_finish(); + Q_EMIT build_finish(); QWaitCondition* _cond=_evt_array[i].get_cond(); _cond->wait(_mutex); locker.unlock(); @@ -120,7 +120,7 @@ void SerializerDispatcher::dump(IntervalOfContainer* itc, char* name){ } itc->_loaded=false; - emit dump_on_disk(itc, name); + Q_EMIT dump_on_disk(itc, name); _evt_array[_previous_call].get_sem_free()->release(); } @@ -152,7 +152,7 @@ void SerializerDispatcher::load(IntervalOfContainer* itc, char* name){ } itc->_loaded=true; - emit load_data(itc, name); + Q_EMIT load_data(itc, name); _evt_array[_previous_call].get_sem_free()->release(); } diff --git a/src/trace/SerializerDispatcher.hpp b/src/trace/SerializerDispatcher.hpp index e4556b2c0d1c4e529fa79df47490c9e6a8c0a6e5..c7d68a0c14d9469a120a5d70269179d6cb9fc87a 100644 --- a/src/trace/SerializerDispatcher.hpp +++ b/src/trace/SerializerDispatcher.hpp @@ -78,7 +78,7 @@ public: //dump an itc, after choosing a free thread to use void dump(IntervalOfContainer* itc, char* ); void load(IntervalOfContainer*, char*); - signals: + Q_SIGNALS: void load_data(IntervalOfContainer*, char*); void dump_on_disk(IntervalOfContainer*, char*); void build_finish(); diff --git a/src/trace/SerializerWriter.hpp b/src/trace/SerializerWriter.hpp index 5b3292a3a6202c7ae9853f2c3ce5fba5b691fc88..607e9b232ea6c5123f990bb9270a3553518430ff 100644 --- a/src/trace/SerializerWriter.hpp +++ b/src/trace/SerializerWriter.hpp @@ -84,7 +84,7 @@ public: QThread* get_thread(); -public slots: +public Q_SLOTS: void dump_on_disk(IntervalOfContainer* itc, char* filename); diff --git a/src/trace/Trace.cpp b/src/trace/Trace.cpp index 8e8005fe1bee40db48b0b022312475f7a7c3b875..5b26ca0d7a3c07b4c95b35353844421303d6e9dc 100644 --- a/src/trace/Trace.cpp +++ b/src/trace/Trace.cpp @@ -74,8 +74,9 @@ #include "trace/tree/Interval.hpp" /* -- */ -#include <QtXml> - +#include <QDomDocument> +#include <QFile> +#include <QIODevice> #if defined(USE_ITC) && defined(BOOST_SERIALIZE) #include <fstream> diff --git a/src/trace/TraceBuilderThread.hpp b/src/trace/TraceBuilderThread.hpp index 4b24844a489212f882ef6a6281ac1370081cae45..6c72c4087763fb1b9fc494077620cc21c01c7e6e 100644 --- a/src/trace/TraceBuilderThread.hpp +++ b/src/trace/TraceBuilderThread.hpp @@ -90,7 +90,7 @@ public: static void end_link(Trace_builder_struct* tb_struct); - public slots: + public Q_SLOTS: void build_trace(int n, Trace_builder_struct* tb_struct); void build_finished(); bool is_finished(); diff --git a/tests/generator/GeneratorWindow.hpp b/tests/generator/GeneratorWindow.hpp index 540193c8a79b93e1d78e6536f1b229def3003ad8..21c5df23e43ce9b83a605de17838cf5e29225540 100644 --- a/tests/generator/GeneratorWindow.hpp +++ b/tests/generator/GeneratorWindow.hpp @@ -102,7 +102,7 @@ public : void cleanParam (); int run (); -protected slots : +protected Q_SLOTS: void generateButton_clicked (); void resetButton_clicked (); diff --git a/tests/plugin/Plug1.cpp b/tests/plugin/Plug1.cpp index e9cefe7903632ca93d12ac65dba2d38011977ddc..509f983cbce37857b5cb26898bd06f7ec8d4019c 100644 --- a/tests/plugin/Plug1.cpp +++ b/tests/plugin/Plug1.cpp @@ -6,7 +6,7 @@ public: void set_arguments(std::map<std::string /*argname*/, QVariant */*argValue*/>) {} std::string get_name() { return "Plug1"; } -public slots: +public Q_SLOTS: void execute() { printf("Plug1 : exec\n"); } }; diff --git a/tests/plugin/Plug2.cpp b/tests/plugin/Plug2.cpp index afef088861776bfb7ca5ff8615323be00531c541..3a5600abde878dadbacef5954fa2e71572600555 100644 --- a/tests/plugin/Plug2.cpp +++ b/tests/plugin/Plug2.cpp @@ -7,7 +7,7 @@ public: std::string get_name() { return "Plug2"; } -public slots: +public Q_SLOTS: void execute() { printf("Plug2 : exec\n"); } }; diff --git a/tests/plugin/Plug3.hpp b/tests/plugin/Plug3.hpp index b39b359bba8b1aaf5cc8dfe27534cc1740582471..7ac3d41b896342076bfb353419a6bc3d9be601e0 100644 --- a/tests/plugin/Plug3.hpp +++ b/tests/plugin/Plug3.hpp @@ -10,7 +10,7 @@ public: std::string get_name() { return "Plug3"; } -public slots: +public Q_SLOTS: void execute() { printf("Plug3 : exec\n"); } }; diff --git a/tests/plugin/PluginWindow.hpp b/tests/plugin/PluginWindow.hpp index 20f783f34d50d15cd172d9bc53c8b458adbf145a..c757a5834ee0d344def364baff4969d335c0ab02 100644 --- a/tests/plugin/PluginWindow.hpp +++ b/tests/plugin/PluginWindow.hpp @@ -28,7 +28,7 @@ private: void load_shared_plugins(); void add_plugin(Plugin *plug); -public slots: +public Q_SLOTS: void init_plugin(int index); void execute_plugin(); };