This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243943 - "extract body" breaks class in HelloQtWorld sample (deletes Q_OBJECT macro)
Summary: "extract body" breaks class in HelloQtWorld sample (deletes Q_OBJECT macro)
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-19 19:02 UTC by soldatov
Modified: 2014-04-24 02:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2014-04-19 19:02:16 UTC
I use latest Oracle Solaris Studio build, but I think, this bug can be reproduced in NetBeans trunk also.

Environment: CentOS 6.5, GCC 4.4.7, Qt 4.6.2
Scenario:
- Launch IDE
- Create "Hello Qt World" sample (select GNU toolchain)
- Build project
- Open HelloForm.cpp file
- Select latest line and press Ctrl-Space
==> I see 5 "extract body" and 3 "implement" menu items

HelloForm.h file contains special Qt macro (Q_OBJECT). This macro hides 4 inline methods. If I will select any of "extract body" items, then IDE generates new method inside of HelloForm.cpp file. I can delete new defenition, build and run project. But really my code has been broken by IDE. Code Generator deleted Q_OBJECT macro from class declaration.
Comment 1 Alexander Simon 2014-04-21 10:45:23 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/549e28a599af
Comment 2 Quality Engineering 2014-04-22 02:26:43 UTC
Integrated into 'main-silver', will be available in build *201404220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/549e28a599af
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #243943 "extract body" breaks class in HelloQtWorld sample (deletes Q_OBJECT macro)
Comment 3 soldatov 2014-04-22 10:01:43 UTC
verified in trunk build 201404220001
Comment 4 Quality Engineering 2014-04-24 02:03:11 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/21adac4210ab
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #243943 "extract body" breaks class in HelloQtWorld sample (deletes Q_OBJECT macro)
(transplanted from 549e28a599af992e6497b15fe3037a384abf190c)