diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-20 18:14:39 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-30 15:01:54 (GMT) |
commit | 71c670a65ae538dea7bde388fcc138060767cb31 (patch) | |
tree | 33804d4f88e70310cbfc1807b23f1700043adf92 /qmake | |
parent | eda04e91503fe8573bfaa4384f979596c72a8ae6 (diff) | |
download | Qt-71c670a65ae538dea7bde388fcc138060767cb31.zip Qt-71c670a65ae538dea7bde388fcc138060767cb31.tar.gz Qt-71c670a65ae538dea7bde388fcc138060767cb31.tar.bz2 |
add -Wdeprecated option (on by default)
Reviewed-by: joerg
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/option.cpp | 10 | ||||
-rw-r--r-- | qmake/option.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp index 49030c3..13e855c 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -84,7 +84,7 @@ Option::QMAKE_MODE Option::qmake_mode = Option::QMAKE_GENERATE_NOTHING; //all modes QString Option::qmake_abslocation; -int Option::warn_level = WarnLogic; +int Option::warn_level = WarnLogic | WarnDeprecated; int Option::debug_level = 0; QFile Option::output; QString Option::output_dir; @@ -170,10 +170,12 @@ bool usage(const char *a0) " file in your current working directory\n" "\n" "Warnings Options:\n" - " -Wnone Turn off all warnings\n" + " -Wnone Turn off all warnings; specific ones may be re-enabled by\n" + " later -W options\n" " -Wall Turn on all warnings\n" " -Wparser Turn on parser warnings\n" - " -Wlogic Turn on logic warnings\n" + " -Wlogic Turn on logic warnings (on by default)\n" + " -Wdeprecated Turn on deprecation warnings (on by default)\n" "\n" "Options:\n" " * You can place any variable assignment in options and it will be *\n" @@ -278,6 +280,8 @@ Option::parseCommandLine(int argc, char **argv, int skip) Option::warn_level |= WarnParser; } else if(opt == "Wlogic") { Option::warn_level |= WarnLogic; + } else if(opt == "Wdeprecated") { + Option::warn_level |= WarnDeprecated; } else if(opt == "Wnone") { Option::warn_level = WarnNone; } else if(opt == "r" || opt == "recursive") { diff --git a/qmake/option.h b/qmake/option.h index 9bfdaed..b09ead2 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -63,6 +63,7 @@ enum QMakeWarn { WarnNone = 0x00, WarnParser = 0x01, WarnLogic = 0x02, + WarnDeprecated = 0x04, WarnAll = 0xFF }; void warn_msg(QMakeWarn t, const char *fmt, ...); |