diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-17 15:02:46 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-17 15:02:46 +0100 |
commit | 2e5db45aba607dcc7c79ff892bbb82af46ddb918 (patch) | |
tree | f2a3699a75428e7dc4da03d39318d235a14f5198 | |
parent | Tab shortcuts (diff) | |
download | smolbote-2e5db45aba607dcc7c79ff892bbb82af46ddb918.tar.xz |
Added deprecated API warnings
-rw-r--r-- | src/smolbote.qbs | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/smolbote.qbs b/src/smolbote.qbs index ab63f9b..439014c 100644 --- a/src/smolbote.qbs +++ b/src/smolbote.qbs @@ -3,18 +3,31 @@ import "GitRepo.js" as GitRepo Project { id: project - minimumQbsVersion: "1.7.0" - property bool gitFlag: true + // Qt 5.7 has qbs version 1.6.0 + // Qt 5.8 has qbs version 1.7.0 + minimumQbsVersion: "1.6.0" + + property bool gitVersion: true + + // The following define makes your compiler emit warnings if you use any + // feature of Qt which as been marked as deprecated (the exact warnings + // depend on your compiler). Please consult the documentation of the + // deprecated API in order to know how to port your code away from it. + + // The code also fails to compile if you use APIs deprecated before Qt 5,7. + property bool deprecatedWarnings: true CppApplication { + id: poi name: "poi" + property stringList defines: [] Probe { id: git property string version: "1.0.0" property string describe: "1.0.0-0-00000000" configure: { - if(project.gitFlag) { + if(project.gitVersion) { var meta = GitRepo.read(project.sourceDirectory); version = meta.version; describe = meta.describe; @@ -24,9 +37,12 @@ Project { } cpp.includePaths: ['.'] - Properties { - condition: git.found - cpp.defines: ['VERSION="'+git.version+'"'] + cpp.defines: { + if(project.deprecatedWarnings) + defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE=0x050700"); + if(git.found) + defines.push('VERSION="'+git.version+'"'); + return defines; } files: [ |