[Differential] [Commented On] D4384: Fix preview for file templates with options: add vars with default values

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Wed Feb 1 00:30:05 UTC 2017


kossebau added a comment.


  Hard to show by one single screenshot, there are many small issues across many templates :)
  It is all places in templates where output based on options is done, like `{{ interfaceid }}` or `{% if testCase_initAndCleanup %}foo{% endif %}`. With all those vars evaluating to null the templates look empty or partially broken.
  
  By example of Qt test suite template, "Implementation" file preview content.
  
  With patch:
  
    /*
     * This file is licensed under the ExampleLicense 3.0
     */
    
    #include "Example.h"
    
    #include <QtTest>
    
    QTEST_MAIN(Example);
    
    void Example::initTestCase()
    {
        // Called before the first testfunction is executed
    }
    
    void Example::cleanupTestCase()
    {
        // Called after the last testfunction was executed
    }
    
    void Example::init()
    {
        // Called before each testfunction is executed
    }
    
    void Example::cleanup()
    {
        // Called after every testfunction
    }
    
    void Example::doFoo()
    {
    
    }
    
    void Example::doBar()
    {
    
    }
    
    void Example::doMore()
    {
    
    }
  
  Without:
  
    /*
     * This file is licensed under the ExampleLicense 3.0
     */
    
    #include "Example.h"
    
    #include <QtTest>
    
    (Example);
    
    void Example::doFoo()
    {
    
    }
    
    void Example::doBar()
    {
    
    }
    
    void Example::doMore()
    {
    
    }

REPOSITORY
  R33 KDevPlatform

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

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

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


More information about the KDevelop-devel mailing list