[Differential] [Planned Changes To] D4375: Qt/C++ file templates: generate apidox, fixed indentation/empty lines

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Tue Jan 31 18:23:09 UTC 2017


kossebau planned changes to this revision.
kossebau added a comment.


  Example output:
  QObject template,
  id "KDevelop::Foo"
  selected methods to override:
  
  - default constructor
  - destructor
  - bool event(QEvent* event)
  
  member: "Bar bar"
  
    /*
     * <one line to give the library's name and an idea of what it does.>
     * Copyright (C) 2017  Hans Entwickler <email>
     * 
     * This library is free software; you can redistribute it and/or
     * modify it under the terms of the GNU Lesser General Public
     * License as published by the Free Software Foundation; either
     * version 2.1 of the License, or (at your option) any later version.
     * 
     * This library is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     * Lesser General Public License for more details.
     * 
     * You should have received a copy of the GNU Lesser General Public
     * License along with this library; if not, write to the Free Software
     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     * 
     */
    
    #ifndef KDEVELOP_FOO_H
    #define KDEVELOP_FOO_H
    
    namespace KDevelop {
    
    /**
     * @todo write docs
     */
    class Foo : public QObject
    {
        Q_OBJECT
        Q_PROPERTY(Bar bar READ bar WRITE setBar)
    
    public:
        /**
         * Default constructor
         *
         * @todo write arguments/return docs
         * @return TODO
         */
        Foo();
        /**
         * Destructor
         *
         * @todo write arguments/return docs
         * @return TODO
         */
        ~Foo();
        /**
         * @todo write docs
         *
         * @todo write arguments/return docs
         * @param event TODO
         * @return TODO
         */
        virtual bool event(QEvent* event);
    
        /**
         * @return the bar
         */
        Bar bar() const;
    
    public Q_SLOTS:
        /**
         * Sets the bar.
         *
         * @param bar the new bar
         */
        void setBar(Bar bar);
    
    private:
        Bar m_bar;
    };
    
    }
    
    #endif // KDEVELOP_FOO_H
  
  and
  
    /*
     * <one line to give the library's name and an idea of what it does.>
     * Copyright (C) 2017  Hans Entwickler <email>
     * 
     * This library is free software; you can redistribute it and/or
     * modify it under the terms of the GNU Lesser General Public
     * License as published by the Free Software Foundation; either
     * version 2.1 of the License, or (at your option) any later version.
     * 
     * This library is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     * Lesser General Public License for more details.
     * 
     * You should have received a copy of the GNU Lesser General Public
     * License along with this library; if not, write to the Free Software
     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     * 
     */
    
    #include "foo.h"
    
    using namespace KDevelop;
    
    Foo::Foo()
    {
    }
    
    Foo::~Foo()
    {
    }
    
    bool Foo::event(QEvent* event)
    {
    }
    
    Bar Foo::bar() const
    {
        return m_bar;
    }
    
    void Foo::setBar(Bar bar)
    {
        m_bar = bar;
    }
  
  Sigh... the constructor/destructor api dox is flawed, seems somewhere in my stashing/branch switching I managed to upload an older version, moment...

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D4375

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kossebau, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170131/15abfd34/attachment-0001.html>


More information about the KDevelop-devel mailing list