summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-10-25 21:07:02 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-10-25 21:07:02 +0000
commit8f64a1d13671dde96873c6245de850b133d7ad32 (patch)
tree2e91b7266621210009f7d56332437e557b06245d
parentb1cfc45853705163da0641eb8cf1cd77783e009d (diff)
Proper integraton of IWYU into the build (including massaging clang errors into the issues tab).
Note: There is at least one ug in QT that stops thing s copiling because it doesn't undertand clangs version
-rw-r--r--massage_messages.py12
-rw-r--r--qtmappings.imp32
-rw-r--r--src/modinfo.h4
3 files changed, 36 insertions, 12 deletions
diff --git a/massage_messages.py b/massage_messages.py
new file mode 100644
index 00000000..656c48bd
--- /dev/null
+++ b/massage_messages.py
@@ -0,0 +1,12 @@
+# Attempt to massage the messages from clang so that QT recognises them
+# expected: source\bsatk\bsafile.cpp(101) : fatal error C1189: #error : "we may have to compress/decompress!"
+# clang: source\bsatk\bsafile.cpp(101) : error: "we may have to compress/decompress!"
+
+import fileinput
+import re
+
+for line in fileinput.input():
+ # Look for '\) : ([^:])?:'
+ # Replace with ') : \1 I0000:
+ line.rstrip()
+ print re.sub(r'\)\s*:\s*([^:]*):', r') : \1 I0000:', line) \ No newline at end of file
diff --git a/qtmappings.imp b/qtmappings.imp
index 17073ddd..deea653f 100644
--- a/qtmappings.imp
+++ b/qtmappings.imp
@@ -195,7 +195,10 @@
{ include: [ "\"qwhatsthis.h\"", "private", "<QWhatsThis>", "public" ] },
{ include: [ "\"qwidgetaction.h\"", "private", "<QWidgetAction>", "public" ] },
{ include: [ "\"qimagereader.h\"", "private", "<QImageReader>", "public" ] },
-
+ { include: [ "\"qdeclarativecontext.h\"", "private", "<QDeclarativeContext>", "public" ] },
+ { include: [ "\"qdeclarativeview.h\"", "private", "<QDeclarativeView>", "public" ] },
+# looks wrong
+# { include: [ "\"qgraphicsitem.h\"", "private", "<QGraphicsObject>", "public" ] },
# Microsft visual C?
@@ -210,7 +213,7 @@
{ symbol: [ "ULONG", "private", "<windef.h>", "private" ] },
{ include: [ "<winnls.h>", "private", "<stringapiset.h>", "private" ] }, # Stringapiset.h
- { include: [ "<stringapiset.h>", "private", "<Windows.h>", "public" ] }, # Windows.h
+ { include: [ "<stringapiset.h>", "private", "<Windows.h>", "public" ] },
# These are all in windef.h apparently. Which m/s then says 'use Windows.h'
{ include: [ "<basetsd.h>", "private", "<windef.h>", "private" ] }, # or in winnt apparently
@@ -227,6 +230,7 @@
{ include: [ "<securitybaseapi.h>", "private", "<winbase.h>", "private" ] },
# These ones say xxxx.h (include Windows.h) on the ms web site
+ { include: [ "<datetimeapi.h>", "private", "<Windows.h>", "public" ] },
{ include: [ "<fileapi.h>", "private", "<Windows.h>", "public" ] },
{ include: [ "<verrsrc.h>", "private", "<Windows.h>", "public" ] }, # VerRsrc.h
{ include: [ "<winbase.h>", "private", "<Windows.h>", "public" ] },
@@ -245,14 +249,26 @@
{ include: [ "<DbgHelp.h>", "private", "<Windows.h>", "public" ] },
# These 3 should go to Shellapi.h
{ include: [ "<ShellAPI.h>", "private", "<Windows.h>", "public" ] },
- { include: [ "<Shellapi.h>", "private", "<Windows.h>", "public" ] },
+ { include: [ "<Shellapi.h>", "private", "<Windows.h>", "public" ] }, # official name according to website
{ include: [ "<shellapi.h>", "private", "<Windows.h>", "public" ] },
+ #
+ { include: [ "<knownfolders.h>", "private", "<Windows.h>", "public" ] },
+ { include: [ "<ShlObj.h>", "private", "<Windows.h>", "public" ] },
{ include: [ "<objidl.h>", "private", "<Windows.h>", "public" ] },
-# combaseapi.h is for objbase.h but objbase.h appears to come free with Windows.h
-# Windows.h is a pile of ...
- { include: [ "<combaseapi.>", "private", "<objbase.h>", "private" ] },
+
+# Files that are included by other files which seem to then come for free in Windows.h but
+# shouldn't. Again, should be cleaned up.
+
+ { include: [ "<basetyps.h>", "private", "<objbase.h>", "private" ] },
+ { include: [ "<combaseapi.h>", "private", "<objbase.h>", "private" ] },
{ include: [ "<objbase.h>", "private", "<Windows.h>", "public" ] },
+ { include: [ "<wtypesbase.h>", "private", "<WTypes.h>", "private" ] },
+ { include: [ "<WTypes.h>", "private", "<Windows.h>", "public" ] },
+
+ { include: [ "<guiddef.h>", "private", "<Rpc.h>", "private" ] },
+ { include: [ "<Rpc.h>", "private", "<Windows.h>", "public" ] },
+
# Huh? This one is sane?
{ include: [ "<shlguid.h>", "private", "<shobjidl.h>", "public" ] },
@@ -279,15 +295,11 @@
# Warning: QtGroupingProxy is not provided by Qt
-#include "qdeclarativecontext.h" // for QDeclarativeContext
-#include "qdeclarativeview.h" // for QDeclarativeView, etc
-#include "qgraphicsitem.h" // for QGraphicsObject
#include "qpluginloader.h"
#include "qnetworkproxy.h"
# Ones I don't yet know how to deal with
-#include <wtypesbase.h>
#include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion
#include "boost/iterator/iterator_facade.hpp" // for operator!=
#include <crtdbg.h> // for operator delete[], etc
diff --git a/src/modinfo.h b/src/modinfo.h
index d9de60e8..da97b09b 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -1047,7 +1047,7 @@ public:
virtual QString notes() const { return ""; }
virtual QDateTime creationTime() const { return QDateTime(); }
virtual QString absolutePath() const;
- virtual MOBase::VersionInfo getNewestVersion() const { return QString(); }
+ virtual MOBase::VersionInfo getNewestVersion() const { return ""; }
virtual QString getInstallationFile() const { return ""; }
virtual int getFixedPriority() const { return INT_MAX; }
virtual int getNexusID() const { return -1; }
@@ -1099,7 +1099,7 @@ public:
virtual QString notes() const { return ""; }
virtual QDateTime creationTime() const;
virtual QString absolutePath() const;
- virtual MOBase::VersionInfo getNewestVersion() const { return QString(); }
+ virtual MOBase::VersionInfo getNewestVersion() const { return ""; }
virtual QString getInstallationFile() const { return ""; }
virtual int getNexusID() const { return -1; }
virtual std::vector<QString> getIniTweaks() const { return std::vector<QString>(); }