Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. How to debug correct constructor ?
QtWS25 Last Chance

How to debug correct constructor ?

Scheduled Pinned Locked Moved Unsolved C++ Gurus
2 Posts 2 Posters 278 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    Here is the class definition, it builds
    m_serial(new QSerialPort(this)
    how do I trace / debug which constructor of QSerialPort is actually used?

    Where do I to put "break point " ?
    QSerialPort(QObject *parent = nullptr); ???

    I use "Follow symbol under cursor" but it does not help.

    MainWindow_Bluetooth::MainWindow_Bluetooth(QWidget *parent) :
    QMainWindow(parent),
    m_ui(new Ui::MainWindow_Bluetooth),
    m_status(new QLabel),
    m_console(new Console),
    m_settings(new SettingsDialog),
    //! [1]
    //! add rfcomm ??
    m_serial(new QSerialPort(this))
    //! [1]
    {

    explicit QSerialPort(QObject *parent = nullptr);
    explicit QSerialPort(const QString &name, QObject *parent = nullptr);
    explicit QSerialPort(const QSerialPortInfo &info, QObject *parent = nullptr);

    Axel SpoerlA 1 Reply Last reply
    0
    • A Anonymous_Banned275

      Here is the class definition, it builds
      m_serial(new QSerialPort(this)
      how do I trace / debug which constructor of QSerialPort is actually used?

      Where do I to put "break point " ?
      QSerialPort(QObject *parent = nullptr); ???

      I use "Follow symbol under cursor" but it does not help.

      MainWindow_Bluetooth::MainWindow_Bluetooth(QWidget *parent) :
      QMainWindow(parent),
      m_ui(new Ui::MainWindow_Bluetooth),
      m_status(new QLabel),
      m_console(new Console),
      m_settings(new SettingsDialog),
      //! [1]
      //! add rfcomm ??
      m_serial(new QSerialPort(this))
      //! [1]
      {

      explicit QSerialPort(QObject *parent = nullptr);
      explicit QSerialPort(const QString &name, QObject *parent = nullptr);
      explicit QSerialPort(const QSerialPortInfo &info, QObject *parent = nullptr);

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by Axel Spoerl
      #2

      @AnneRanch
      You have to set the break point in the implementation, i.e. usually the cpp file.
      The constructors listed are definitions ;-)
      You probably want to debug the first one, which takes only a parent argument.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved