Loading ...
Sorry, an error occurred while loading the content.

773More C++ formatting problems

Expand Messages
  • salmankhilji
    Dec 7, 2003
    • 0 Attachment
      I am using the Dec 2002 release on Linux. I have a C++ constructor like:

      AnalogClock::AnalogClock( QWidget *parent, const char *name )
      : QWidget( parent, name )
      {
      time = QTime::currentTime(); // get current time
      QTimer *internalTimer = new QTimer( this ); // create internal
      }



      If I issue the restyle region command, I get this:

      AnalogClock::AnalogClock( QWidget *parent, const char *name )
      : QWidget( parent, name )
      {
      time = QTime::currentTime(); // get current time
      QTimer *internalTimer = new QTimer( this ); // create internal
      }



      Notice that the ": QWidget" constructor initialization list is take to
      the beginning of the line. It is preferable in C++ to indent the
      constructor initialization list a little bit---like it was before
      restyle region.

      Has this been fixed in the latest release?

      Salman
    • Show all 2 messages in this topic