[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 298511] New: Change returned type of static function in it's definition (cpp file) made remove
From:       Piotr Mierzwinski <piotr.mierzwinski () gmail ! com>
Date:       2012-04-20 22:32:44
Message-ID: bug-298511-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=298511

            Bug ID: 298511
          Severity: normal
           Version: 4.3.0
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: Change returned type of static function in it's
                    definition (cpp file) made remove word "static" in
                    it's declaration (header)
    Classification: Unclassified
                OS: Linux
          Reporter: piotr.mierzwinski@gmail.com
          Hardware: Mandriva RPMs
            Status: UNCONFIRMED
         Component: Language Support: CPP
           Product: kdevelop

Change returned type (example from int to char) of static function in it's
definition made shows menu: "1 - Update declaration signature". After choose
Alt+1 word "static" is removed in it's declaration. Example:
header file:
#ifndef TEST_H
#define TEST_H

class Test
{
public:
    Test();

    static int foo( int param );
};

#endif // TEST_H

cpp file:
#include "test.h"

Test::Test()
{
}

int Test::foo(int param)
{
    return 1;
}

Now let's change return type int to char.

Reproducible: Always

Steps to Reproduce:
1. Create class Test
2. In header's file (section public) create declaration of static function
(example: "static int foo( int param );") 
3. In cpp file create definition for this function (example: "int Test::foo(int
param) { return 1; }")
4. Save all files
5. Change retuned type from int to char
6. Choose Alt+1 for popup menu: "1 - Update declaration signature  0 - Hide"
7. Look to the header file
Actual Results:  
header file:
#ifndef TEST_H
#define TEST_H

class Test
{
public:
    Test();

       char foo( int param );
};

#endif // TEST_H

cpp file:
#include "test.h"

Test::Test()
{
}

char Test::foo(int param)
{
    return 1;
}


Expected Results:  
header file:
#ifndef TEST_H
#define TEST_H

class Test
{
public:
    Test();

    static char foo( int param );
};

#endif // TEST_H

cpp file:
#include "test.h"

Test::Test()
{
}

char Test::foo(int param)
{
    return 1;
}


Tested on KDevelop4.3.1
Linux distribution: Mandriva 2011.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic