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 225495 - Qt5: build fails on #include <QtGui/QApplication>
Summary: Qt5: build fails on #include <QtGui/QApplication>
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: igor_nikiforov
URL:
Keywords:
Depends on:
Blocks: 218532
  Show dependency tree
 
Reported: 2013-01-29 20:41 UTC by soldatov
Modified: 2013-05-29 02:05 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 2013-01-29 20:41:07 UTC
Scenario:
- Install Qt 5.0 on Ubuntu
- Add qmake to PATH and toolchain
- Create "C/C++ Qt Application" or "Hello Qt World" project
- Build project
==>
make[2]: Вход в каталог `/home/sova/NetBeansProjects/QtApplication_1'
g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.0/5.0.0/gcc_64/mkspecs/linux-g++-64 -Inbproject -I/opt/Qt5.0.0/5.0.0/gcc_64/include -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtGui -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtCore -I. -I. -o build/Debug/GNU-Linux-x86/main.o main.cpp
main.cpp:8:30: фатальная ошибка: QtGui/QApplication: Нет такого файла или каталога
компиляция прервана.

- Add "QT += widgets" into "Build|Qt|Custom Definitions" field
- Rebuild project
==>
make[2]: Вход в каталог `/home/sova/NetBeansProjects/QtApplication_1'
g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.0/5.0.0/gcc_64/mkspecs/linux-g++-64 -Inbproject -I/opt/Qt5.0.0/5.0.0/gcc_64/include -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtWidgets -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtGui -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtCore -I. -I. -o build/Debug/GNU-Linux-x86/main.o main.cpp
main.cpp:8:30: фатальная ошибка: QtGui/QApplication: Нет такого файла или каталога
компиляция прервана.

- Replace "#include <QtGui/QApplication>" on "#include <QApplication>" in main.cpp
- Rebuild project
==> ok
Comment 1 igor_nikiforov 2013-05-28 13:34:11 UTC
Here is the fix:
  http://hg.netbeans.org/cnd-main/rev/35af16f3c8b3

The described changes works for Qt 4 as well, so I've turned them on by default.
Comment 2 Quality Engineering 2013-05-29 02:05:49 UTC
Integrated into 'main-golden', will be available in build *201305282301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/35af16f3c8b3
User: igor_nikiforov <igor_nikiforov@netbeans.org>
Log: Bug 225495 - Qt5: build fails on #include <QtGui/QApplication> - fix.