Bug 364906 - Adapt signature breaks code if in declaration of function there is no parameter name
Summary: Adapt signature breaks code if in declaration of function there is no paramet...
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: git master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-29 19:41 UTC by Piotr Mierzwinski
Modified: 2022-11-30 20:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2016-06-29 19:41:08 UTC
There is following code:
declaration (header file):
    void slotUrlActivated(const QUrl&);

definition (cpp file):
void MainWindow::slotUrlActivated( const QUrl &u )
{
  qDebug() << "MainWindow::slotUrlActivated" << u.path();
}

Being in header file.
In above declaration I insert single space before "const" and after ampersand. Appears helper: "Adapt signature 1. Update definition signature  0. Hide".  I choose 1
In result code becomes broken - a bit in declaration, and more in definition.


Reproducible: Always


Actual Results:  
header:
  void MainWindow::slotUrlActivated ( const QUrl & )
    ;

definition:
void MainWindow::slotUrlActivated( const QUrl &u )
{ 
  qDebug() << "MainWindow::slotUrlActivated" << .path();
}

Expected Results:  
header:
  void MainWindow::slotUrlActivated ( const QUrl & );

definition:
void MainWindow::slotUrlActivated( const QUrl &u )
{ 
  qDebug() << "MainWindow::slotUrlActivated" << u.path();
}

KDevelop and KDevplatform cloned and built at Jun 13, 2016. Branch 5.0.
Plasma 5.6.5, KF-5.23 built with Qt-5.6.0
Comment 1 Piotr Mierzwinski 2016-06-29 19:45:01 UTC
Sorry for mistake.
Expected Results:  
header:
  void slotUrlActivated ( const QUrl & );
Comment 2 Justin Zobel 2022-10-22 00:00:06 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-06 05:07:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-11-21 05:15:22 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 5 Piotr Mierzwinski 2022-11-30 20:39:20 UTC
I retested this and seems issue still persists.
Result what I got is the same like I described above (couple years ago), so:

- declaration (header file)
	void MainWindow::slotUrlActivated(const QUrl&)
;
Here was added "MainWindow::" as this would be definition.

- definition (cpp file):
void MainWindow::slotUrlActivated( const QUrl & u )
{
	qDebug() << "MainWindow::slotUrlActivated. Path:" << .path();
}
Here is missing object name like passed in parameter, so "u".