forked from qt-creator/qt-creator
Wizards: Update templates in regard to deprecation warnings
The QT_DEPRECATED_WARNINGS macro has no effect anymore, so let's remove it along with the huge chunk of comments that took up an inordinate amount of space in the resulting project file. The concise comment for the QT_DISABLE_DEPRECATED_BEFORE macro is perfectly sufficient. Fixes: QTCREATORBUG-24244 Change-Id: I549c16c2c037bb64c2833e4807047ab3a8b2103f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -3,15 +3,8 @@ QT -= gui
|
|||||||
CONFIG += c++11 console
|
CONFIG += c++11 console
|
||||||
CONFIG -= app_bundle
|
CONFIG -= app_bundle
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# any Qt feature that has been marked 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.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
SOURCES += \\
|
SOURCES += \\
|
||||||
|
@@ -4,15 +4,8 @@ QtApplication {
|
|||||||
cpp.cxxLanguageVersion: "c++11"
|
cpp.cxxLanguageVersion: "c++11"
|
||||||
|
|
||||||
cpp.defines: [
|
cpp.defines: [
|
||||||
// The following define makes your compiler emit warnings if you use
|
// You can make your code fail to compile if it uses deprecated APIs.
|
||||||
// any Qt feature that has been marked 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.
|
|
||||||
"QT_DEPRECATED_WARNINGS",
|
|
||||||
|
|
||||||
// You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
// In order to do so, uncomment the following line.
|
// In order to do so, uncomment the following line.
|
||||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -17,15 +17,8 @@ DEFINES += %{LibraryDefine}
|
|||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# any Qt feature that has been marked 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.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
SOURCES += \\
|
SOURCES += \\
|
||||||
|
@@ -20,16 +20,9 @@ DynamicLibrary {
|
|||||||
"QT_PLUGIN",
|
"QT_PLUGIN",
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
// The following define makes your compiler emit warnings if you use
|
// You can make your code fail to compile if it uses deprecated APIs.
|
||||||
// any Qt feature that has been marked 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.
|
|
||||||
"QT_DEPRECATED_WARNINGS",
|
|
||||||
|
|
||||||
// You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
// In order to do so, uncomment the following line.
|
// In order to do so, uncomment the following line.
|
||||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||||
// "QT_DISABLE_DEPRECATED_BEFORE=0x060000", // disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
]
|
]
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
|
@@ -6,15 +6,8 @@ QT += quick
|
|||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
|
||||||
# depend on your compiler). Refer to the documentation for the
|
|
||||||
# deprecated API to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
SOURCES += \\
|
SOURCES += \\
|
||||||
|
@@ -13,15 +13,8 @@ CppApplication {
|
|||||||
cpp.cxxLanguageVersion: "c++14"
|
cpp.cxxLanguageVersion: "c++14"
|
||||||
|
|
||||||
cpp.defines: [
|
cpp.defines: [
|
||||||
// The following define makes your compiler emit warnings if you use
|
// You can make your code fail to compile if it uses deprecated APIs.
|
||||||
// any Qt feature that has been marked 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.
|
|
||||||
"QT_DEPRECATED_WARNINGS",
|
|
||||||
|
|
||||||
// You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
// In order to do so, uncomment the following line.
|
// In order to do so, uncomment the following line.
|
||||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -4,15 +4,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# any Qt feature that has been marked 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.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
SOURCES += \\
|
SOURCES += \\
|
||||||
|
@@ -3,16 +3,10 @@ import qbs.FileInfo
|
|||||||
QtApplication {
|
QtApplication {
|
||||||
Depends { name: "Qt.widgets" }
|
Depends { name: "Qt.widgets" }
|
||||||
|
|
||||||
// The following define makes your compiler emit warnings if you use
|
|
||||||
// any Qt feature that has been marked 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.
|
|
||||||
// You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
// In order to do so, uncomment the second entry in the list.
|
|
||||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
cpp.defines: [
|
cpp.defines: [
|
||||||
"QT_DEPRECATED_WARNINGS",
|
// You can make your code fail to compile if it uses deprecated APIs.
|
||||||
/* "QT_DISABLE_DEPRECATED_BEFORE=0x060000" */ // disables all the APIs deprecated before Qt 6.0.0
|
// In order to do so, uncomment the following line.
|
||||||
|
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||||
]
|
]
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
|
@@ -14,18 +14,10 @@ CONFIG -= app_bundle
|
|||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# 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.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if you use deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
|
||||||
SOURCES += tst_derivedtest.cpp \
|
SOURCES += tst_derivedtest.cpp \
|
||||||
origin.cpp
|
origin.cpp
|
||||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||||
|
@@ -112,14 +112,8 @@ void QtProjectParameters::writeProFile(QTextStream &str) const
|
|||||||
|
|
||||||
if (qtVersionSupport != SupportQt4Only) {
|
if (qtVersionSupport != SupportQt4Only) {
|
||||||
str << "\n"
|
str << "\n"
|
||||||
"# The following define makes your compiler emit warnings if you use\n"
|
"# You can make your code fail to compile if you use deprecated APIs.\n"
|
||||||
"# any feature of Qt which has been marked as deprecated (the exact warnings\n"
|
|
||||||
"# depend on your compiler). Please consult the documentation of the\n"
|
|
||||||
"# deprecated API in order to know how to port your code away from it.\n"
|
|
||||||
"DEFINES += QT_DEPRECATED_WARNINGS\n\n"
|
|
||||||
"# You can also make your code fail to compile if you use deprecated APIs.\n"
|
|
||||||
"# In order to do so, uncomment the following line.\n"
|
"# In order to do so, uncomment the following line.\n"
|
||||||
"# You can also select to disable deprecated APIs only up to a certain version of Qt.\n"
|
|
||||||
"#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0\n";
|
"#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user