diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/SConscript | 14 | ||||
| -rw-r--r-- | src/bbcode.cpp | 4 | ||||
| -rw-r--r-- | src/browserdialog.cpp | 2 | ||||
| -rw-r--r-- | src/browserview.h | 4 | ||||
| -rw-r--r-- | src/downloadmanager.cpp | 1 | ||||
| -rw-r--r-- | src/helper.h | 2 | ||||
| -rw-r--r-- | src/loadmechanism.cpp | 2 | ||||
| -rw-r--r-- | src/loadmechanism.h | 2 | ||||
| -rw-r--r-- | src/modinfo.cpp | 1 | ||||
| -rw-r--r-- | src/modinfo.h | 4 | ||||
| -rw-r--r-- | src/nxmaccessmanager.cpp | 1 | ||||
| -rw-r--r-- | src/settings.cpp | 1 | ||||
| -rw-r--r-- | src/settings.h | 10 |
13 files changed, 25 insertions, 23 deletions
diff --git a/src/SConscript b/src/SConscript index f09db093..cd2d8a52 100644 --- a/src/SConscript +++ b/src/SConscript @@ -67,7 +67,6 @@ env.Uic(env.Glob('*.ui')) env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk')
-
env.AppendUnique(LIBS = [
'shell32',
'user32',
@@ -114,8 +113,9 @@ env.AppendUnique(LINKFLAGS = [ # modeltest is optional and it doesn't compile anyway...
cpp_files = [
- x for x in Glob('*.cpp')
- if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp'
+ x for x in env.Glob('*.cpp', source = True)
+ if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp' and \
+ not x.name.startswith('moc_') # I think this is a strange bug
]
about_env = env.Clone()
@@ -143,6 +143,14 @@ env.AppendUnique(LIBS = 'zlibstatic') prog = env.Program('ModOrganizer',
cpp_files + env.Glob('*.qrc') + other_sources)
+###############################################################################
+# I'd like to automatically add this to every .o generation.
+if 'IWYU' in env:
+ for f in cpp_files + [ env.File('aboutdialog.cpp') ]:
+ env.AddPostAction(prog, "-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM " + str(f))
+ env.Depends(prog, env['IWYU_MAPPING_FILE'])
+###############################################################################
+
env.InstallModule(prog)
for subdir in ('tutorials', 'stylesheets'):
diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 0f9170d4..56369538 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -21,8 +21,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QRegExp>
#include <map>
-#include <algorithm>
-#include <boost/assign.hpp>
namespace BBCode {
@@ -80,7 +78,7 @@ public: if (tagName == "color") {
QString color = tagIter->second.first.cap(1);
QString content = tagIter->second.first.cap(2);
- if (color.at(0) == "#") {
+ if (color.at(0) == '#') {
return temp.replace(tagIter->second.first, QString("<font style=\"color: %1;\">%2</font>").arg(color, content));
} else {
auto colIter = m_ColorMap.find(color.toLower());
diff --git a/src/browserdialog.cpp b/src/browserdialog.cpp index c382c112..5e6bec00 100644 --- a/src/browserdialog.cpp +++ b/src/browserdialog.cpp @@ -25,8 +25,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "report.h"
#include "persistentcookiejar.h"
-#include "json.h"
-
#include <utility.h>
#include <gameinfo.h>
#include "settings.h"
diff --git a/src/browserview.h b/src/browserview.h index f8b132b8..6a89752a 100644 --- a/src/browserview.h +++ b/src/browserview.h @@ -21,9 +21,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #define NEXUSVIEW_H
+class QEvent;
+class QUrl;
+class QWidget;
#include <QWebView>
#include <QWebPage>
-#include <QTabWidget>
/**
* @brief web view used to display a nexus page
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index bc78cdc6..1aaf4122 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -25,7 +25,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <nxmurl.h>
#include <taskprogressmanager.h>
#include "utility.h"
-#include "json.h"
#include "selectiondialog.h"
#include "bbcode.h"
#include <utility.h>
diff --git a/src/helper.h b/src/helper.h index 36f10db1..410e2527 100644 --- a/src/helper.h +++ b/src/helper.h @@ -21,7 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #define HELPER_H
-#include <QString>
+#include <string>
/**
diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index 4d06bea9..c01955f2 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -56,7 +56,7 @@ void LoadMechanism::writeHintFile(const QDir &targetDirectory) }
-void LoadMechanism::removeHintFile(QDir &targetDirectory)
+void LoadMechanism::removeHintFile(QDir targetDirectory)
{
targetDirectory.remove("mo_path.txt");
}
diff --git a/src/loadmechanism.h b/src/loadmechanism.h index 43a8dd6c..c04473ab 100644 --- a/src/loadmechanism.h +++ b/src/loadmechanism.h @@ -91,7 +91,7 @@ private: void writeHintFile(const QDir &targetDirectory);
// remove the hint file if it exists. does nothing if the file doesn't exist
- void removeHintFile(QDir &targetDirectory);
+ void removeHintFile(QDir targetDirectory);
// compare the two files by md5-hash, returns true if they are identical
bool hashIdentical(const QString &fileNameLHS, const QString &fileNameRHS);
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index e0d888e6..ae64b81f 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -25,7 +25,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "report.h" #include "modinfodialog.h" #include "overwriteinfodialog.h" -#include "json.h" #include "messagedialog.h" #include "filenamestring.h" diff --git a/src/modinfo.h b/src/modinfo.h index da97b09b..d9de60e8 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 ""; }
+ virtual MOBase::VersionInfo getNewestVersion() const { return QString(); }
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 ""; }
+ virtual MOBase::VersionInfo getNewestVersion() const { return QString(); }
virtual QString getInstallationFile() const { return ""; }
virtual int getNexusID() const { return -1; }
virtual std::vector<QString> getIniTweaks() const { return std::vector<QString>(); }
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index 0763bb71..6ec282f6 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -25,7 +25,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "persistentcookiejar.h"
#include "settings.h"
#include <gameinfo.h>
-#include <json.h>
#include <QMessageBox>
#include <QPushButton>
#include <QNetworkProxy>
diff --git a/src/settings.cpp b/src/settings.cpp index 4c2a34c8..b51ba71e 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -22,7 +22,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "settingsdialog.h" #include "utility.h" #include "helper.h" -#include "json.h" #include <gameinfo.h> #include <appconfig.h> #include <utility.h> diff --git a/src/settings.h b/src/settings.h index def1dc5c..580ffe42 100644 --- a/src/settings.h +++ b/src/settings.h @@ -328,7 +328,7 @@ private: }; /** Display/store the configuration in the 'general' tab of the settings dialogue */ - class GeneralTab : SettingsTab + class GeneralTab : public SettingsTab { public: GeneralTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -347,7 +347,7 @@ private: }; /** Display/store the configuration in the 'nexus' tab of the settings dialogue */ - class NexusTab : SettingsTab + class NexusTab : public SettingsTab { public: NexusTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -365,7 +365,7 @@ private: }; /** Display/store the configuration in the 'steam' tab of the settings dialogue */ - class SteamTab : SettingsTab + class SteamTab : public SettingsTab { public: SteamTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -378,7 +378,7 @@ private: }; /** Display/store the configuration in the 'plugins' tab of the settings dialogue */ - class PluginsTab : SettingsTab + class PluginsTab : public SettingsTab { public: PluginsTab(Settings *m_parent, SettingsDialog &m_dialog); @@ -391,7 +391,7 @@ private: }; /** Display/store the configuration in the 'workarounds' tab of the settings dialogue */ - class WorkaroundsTab : SettingsTab + class WorkaroundsTab : public SettingsTab { public: WorkaroundsTab(Settings *m_parent, SettingsDialog &m_dialog); |
