Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.13.1
-
None
-
macOS 10.14.6;
CMake 3.15.3
Apple clang 10.0.1
-
-
be21ff11b7c25e3f6682c7987052557eca48e907 (qt/qtbase/5.13) afec5935ea811755c14683a162868b1a5cfb7ed5 (qt/qtbase/5.12)
Description
Problem:
the call 'QApplication::applicationDirPath()' is always empty for 'debug'-only build of cmake projects.
How to reproduce it:
- create via QtCreator menu new project, application, widget-type, cmake-based build
- open generated main.cpp and after QApplication app definition insert this line:
qDebug() << "=== app path:" << QApplication::applicationDirPath(); - compile and start
Observed:
- non-debug builds are OK
- Qt 5.12.x get proper result for debug build as well
- 5.13.1 debug build output is:
objc[83404]: Class QMacAutoReleasePoolTracker is implemented in both /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore (0x104a4d6b0) and /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore_debug (0x103d451e8). One of the two will be used. Which one is undefined. objc[83404]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore (0x104a4d728) and /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore_debug (0x103d45260). One of the two will be used. Which one is undefined. objc[83404]: Class KeyValueObserver is implemented in both /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore (0x104a4d750) and /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore_debug (0x103d45288). One of the two will be used. Which one is undefined. objc[83404]: Class RunLoopModeTracker is implemented in both /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore (0x104a4d7a0) and /Users/xxx/dev/sdk/Qt/5.13.1/clang_64/lib/QtCore.framework/Versions/5/QtCore_debug (0x103d452d8). One of the two will be used. Which one is undefined. QCoreApplication::applicationDirPath: Please instantiate the QApplication object first === app path: ""
- I tried to trigger clean command line build only (i.e. without QtCreator) and I got the same result
- following these steps for console application instead of widget one for Qt 5.13.1; the output of applicationDirPath is correct in debug (no warning in console)
- Qt 5.13.0 widget app (installed via HomeBrew) is working for debug OK
Expected: debug macOS build return valid app dir path
Attachments
Issue Links
- is duplicated by
-
QTBUG-79252 building in debug mode, cmake and qmake link to debug and release build of Qt respectively
- Closed
For Gerrit Dashboard: QTBUG-78131 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
273458,3 | CMake: Fix usage of debug frameworks on macOS | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |
273832,2 | CMake: Fix usage of debug frameworks on macOS | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |