[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 276794] New: "Create Slot" completion gives invalid code if in
From: Nicolás Alvarez <nicolas.alvarez () gmail ! com>
Date: 2011-06-30 3:19:27
Message-ID: bug-276794-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=276794
Summary: "Create Slot" completion gives invalid code if in same
file as class declaration
Product: kdevelop
Version: 4.2.3
Platform: Compiled Sources
OS/Version: Linux
Status: NEW
Severity: normal
Priority: NOR
Component: Language Support: CPP
AssignedTo: kdevelop-bugs@kdevelop.org
ReportedBy: nicolas.alvarez@gmail.com
Test case:
class Main: public QObject {
Q_OBJECT
signals:
int mysig();
public slots:
int existingSlot();
private:
int func() {
}
};
Inside func, type "connect(this, SIGNAL(mysig()), mynewslot" and invoke
completion, which will suggest creating a slot called "mynewslot()".
Selecting that option adds the new slot declaration inside the 'public slots'
section, below existingSlot, thus moving the func() declaration one line down.
KDevelop doesn't handle that line change properly, and func turns into:
int func() { SLOT(mynewslot()));
connect(this, SIGNAL(mysig()), mynewslot
}
This problem happens any time the code being completed is in the same file and
after the place where the slot declaration is added; not only if func() is
being defined inside the class declaration.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- 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