qt-creator

How to set C++ standard in QtCreator with ClangCodeModel plugin?

纵饮孤独 提交于 2020-04-14 07:01:01
问题 Sorry if this is a dumb question, but I have already tried almost everything and am banging my head against a wall right now.. The problem is, QtCreator 4.8.0-beta for Windows with Clang Code Model plugin parses my project as C++98 whereas in fact it is C++17. However specifying the standard version explicitly in the settings dialog is not allowed ("Option "-std=c++17" is invalid"). So, how do I tell ClangCodeModel that it should parse code as C++17? I use CMake for building the project and

How to set C++ standard in QtCreator with ClangCodeModel plugin?

左心房为你撑大大i 提交于 2020-04-14 07:00:32
问题 Sorry if this is a dumb question, but I have already tried almost everything and am banging my head against a wall right now.. The problem is, QtCreator 4.8.0-beta for Windows with Clang Code Model plugin parses my project as C++98 whereas in fact it is C++17. However specifying the standard version explicitly in the settings dialog is not allowed ("Option "-std=c++17" is invalid"). So, how do I tell ClangCodeModel that it should parse code as C++17? I use CMake for building the project and

QtCreator Cmake C++17 Features

假装没事ソ 提交于 2020-03-22 09:39:19
问题 So here I am, compiling my CMake-based C++ Projects in my terminal like there's not tomorrow with gcc-7.2.0 on Xubuntu 16.04 (via ppa) Everything works fine and the new features add considerable value to my codebase. However, trying to compile the very same project in qtcreator with the same compiler yields me errors like the following : error: expected ‘)’ before ‘;’ token if (auto event = events_.find(eventName); event == end(events_)) { ^ : error: ‘else’ without a previous ‘if’ } else { ^

Installing multiple versions of Qt library

扶醉桌前 提交于 2020-03-20 06:27:05
问题 I have installed QtSDK in windows and its Qt library version is 4.7.0. Now i want to install Qt library version 4.8.2 for mingw and VS2008. How can i do this? How to introduce multiple versions to QtCreator? Note : I have downloaded libraries from http://qt.nokia.com/downloads 回答1: Sure you can. Just install the libraries in a different location and set Qt Creator to use those as well. You can find how here: http://doc.qt.io/qtcreator/creator-project-qmake.html. You can then choose which

gperftools - profile file not dumped

橙三吉。 提交于 2020-02-28 07:53:58
问题 I've configured and built gpreftools. however, I can't seem to find the generated profile file of my program to display it. I took the following actions: Adding the -lprofiler linker flag to my .pro , building the program and the flag is added correctly at the linking stage. QMAKE_LFLAGS += -lprofiler Running with: $ CPUPROFILE=/tmp/prof.out /path/to/executable Executing: $ pprof --gv /path/to/MyExe /tmp/prof.out Then I get the following: Failed to get profile: curl -s --max-time 90 'http://

gperftools - profile file not dumped

梦想与她 提交于 2020-02-28 07:52:48
问题 I've configured and built gpreftools. however, I can't seem to find the generated profile file of my program to display it. I took the following actions: Adding the -lprofiler linker flag to my .pro , building the program and the flag is added correctly at the linking stage. QMAKE_LFLAGS += -lprofiler Running with: $ CPUPROFILE=/tmp/prof.out /path/to/executable Executing: $ pprof --gv /path/to/MyExe /tmp/prof.out Then I get the following: Failed to get profile: curl -s --max-time 90 'http://

gperftools - profile file not dumped

我怕爱的太早我们不能终老 提交于 2020-02-28 07:52:08
问题 I've configured and built gpreftools. however, I can't seem to find the generated profile file of my program to display it. I took the following actions: Adding the -lprofiler linker flag to my .pro , building the program and the flag is added correctly at the linking stage. QMAKE_LFLAGS += -lprofiler Running with: $ CPUPROFILE=/tmp/prof.out /path/to/executable Executing: $ pprof --gv /path/to/MyExe /tmp/prof.out Then I get the following: Failed to get profile: curl -s --max-time 90 'http://

switch may fall through (no it may not)

核能气质少年 提交于 2020-02-23 16:26:49
问题 On GCC 7 I have enabled most of all warnings on Qt creator 4.9. Now I have a switch statement which covers all enumeration values. If I add a default: I get a warning (from Qt creator): warning: default label in switch which covers all enumeration values If I remove the default: I get another warning (from GCC): error: this statement may fall through [-Werror=implicit-fallthrough=] } ^ error: all warnings being treated as errors What am I supposed to do? Turn off warnings? They are useful, I

Qt for Android: unable to sign Release version of app

旧时模样 提交于 2020-02-03 11:07:58
问题 I am using Qt 5.13 with Qt Creator 4.9.2. I can successfully build the Debug version of my application for Android, but when I try to compile the Release version I get: 16:57:35: The process "/opt/Qt/5.13.0/android_armv7/bin/androiddeployqt" exited with code 15. Error while building/deploying project Notizie2 (kit: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7)) When executing step "Build Android APK" I am not even sure where to begin to fix this, there are no errors other than

Qt for Android: unable to sign Release version of app

陌路散爱 提交于 2020-02-03 11:07:31
问题 I am using Qt 5.13 with Qt Creator 4.9.2. I can successfully build the Debug version of my application for Android, but when I try to compile the Release version I get: 16:57:35: The process "/opt/Qt/5.13.0/android_armv7/bin/androiddeployqt" exited with code 15. Error while building/deploying project Notizie2 (kit: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7)) When executing step "Build Android APK" I am not even sure where to begin to fix this, there are no errors other than