Broken indentation for Qt-specific constructions in Visual Studio

て烟熏妆下的殇ゞ 提交于 2019-12-05 05:02:17

In short answer seems to be NO. Maybe not what you are looking for but maybe you can live with this:

class MyClass : public QObject
   {
   Q_OBJECT
   public:
      MyClass();

   private:
      Q_SIGNAL void someSignal();

   public:
      Q_SLOT void someSlot();
   };

(It's ugly but it seems you can't have your cake and eat it too ;)

Just something I'm wondering about: Is it worth the effort to build a plugin for automatic formatting? Do we really use CTRL-A CTRL-F so much? If so, then yes it could be a pain. But normally if you are working on header files declaring a new method (signal or slot) should not mess up the previous corrected indentation. Perhaps you have some reasons that justifies this?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!