diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 6 | ||||
-rw-r--r-- | src/tools/moc/main.cpp | 10 | ||||
-rw-r--r-- | src/tools/moc/parser.cpp | 6 | ||||
-rw-r--r-- | src/tools/moc/parser.h | 4 |
4 files changed, 22 insertions, 4 deletions
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 9e5845c..50ae2cf 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -77,6 +77,7 @@ SOURCES += \ ../../corelib/tools/qhash.cpp \ ../../corelib/tools/qlist.cpp \ ../../corelib/tools/qlocale.cpp \ + ../../corelib/tools/qlocale_tools.cpp \ ../../corelib/tools/qmap.cpp \ ../../corelib/tools/qregexp.cpp \ ../../corelib/tools/qstring.cpp \ @@ -97,6 +98,11 @@ win32:SOURCES += ../../corelib/io/qfilesystemengine_win.cpp \ ../../corelib/io/qfsfileengine_win.cpp \ ../../corelib/plugin/qsystemlibrary.cpp \ +mac: OBJECTIVE_SOURCES += ../../corelib/tools/qlocale_mac.mm +else:symbian:SOURCES += ../../corelib/tools/qlocale_symbian.cpp +else:unix:SOURCES += ../../corelib/tools/qlocale_unix.cpp +else:win32:SOURCES += ../../corelib/tools/qlocale_win.cpp + macx: { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) SOURCES += ../../corelib/io/qfilesystemengine_mac.cpp diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index 1ecb7e5..ecff105 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -111,6 +111,7 @@ void error(const char *msg = "Invalid argument") " -i do not generate an #include statement\n" " -p<path> path prefix for included file\n" " -f[<file>] force #include, optional file name\n" + " -nn do not display notes\n" " -nw do not display warnings\n" " @<file> read additional options from file\n" " -v display version of moc\n"); @@ -333,9 +334,12 @@ int runMoc(int _argc, char **_argv) case 'n': // don't display warnings if (ignoreConflictingOptions) break; - if (opt != "nw") + if (opt == "nw") + moc.displayWarnings = moc.displayNotes = false; + else if (opt == "nn") + moc.displayNotes = false; + else error(); - moc.displayWarnings = false; break; case 'h': // help if (more && opt != "help") @@ -425,7 +429,7 @@ int runMoc(int _argc, char **_argv) fprintf(out, "%s\n", composePreprocessorOutput(moc.symbols).constData()); } else { if (moc.classList.isEmpty()) - moc.warning("No relevant classes found. No output generated."); + moc.note("No relevant classes found. No output generated."); else moc.generate(out); } diff --git a/src/tools/moc/parser.cpp b/src/tools/moc/parser.cpp index 1fa1401..b6f0837 100644 --- a/src/tools/moc/parser.cpp +++ b/src/tools/moc/parser.cpp @@ -78,4 +78,10 @@ void Parser::warning(const char *msg) { currentFilenames.top().constData(), qMax(0, index > 0 ? symbol().lineNum : 0), msg); } +void Parser::note(const char *msg) { + if (displayNotes && msg) + fprintf(stderr, ErrorFormatString "Note: %s\n", + currentFilenames.top().constData(), qMax(0, index > 0 ? symbol().lineNum : 0), msg); +} + QT_END_NAMESPACE diff --git a/src/tools/moc/parser.h b/src/tools/moc/parser.h index 8356449..a874248 100644 --- a/src/tools/moc/parser.h +++ b/src/tools/moc/parser.h @@ -50,10 +50,11 @@ QT_BEGIN_NAMESPACE class Parser { public: - Parser():index(0), displayWarnings(true){} + Parser():index(0), displayWarnings(true), displayNotes(true) {} Symbols symbols; int index; bool displayWarnings; + bool displayNotes; QStack<QByteArray> currentFilenames; @@ -73,6 +74,7 @@ public: void error(int rollback); void error(const char *msg = 0); void warning(const char * = 0); + void note(const char * = 0); }; |