summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-05-09 21:44:19 +0200
committerTannin <devnull@localhost>2015-05-09 21:44:19 +0200
commitabba182b1ba630b41660424abf372af527b1612c (patch)
treec4fde1f7116fe5cdc7b9d6adb0a3a8d6bd1c93b0 /src
parent0b58653e2d4f3c695981f1346c6d7c6b4c965eeb (diff)
dropped redundant report.h/report.cpp
Diffstat (limited to 'src')
-rw-r--r--src/categories.cpp2
-rw-r--r--src/downloadmanager.cpp2
-rw-r--r--src/helper.cpp4
-rw-r--r--src/logbuffer.cpp5
-rw-r--r--src/main.cpp10
-rw-r--r--src/moapplication.cpp5
-rw-r--r--src/modlist.cpp2
-rw-r--r--src/organizer.pro2
-rw-r--r--src/organizercore.cpp2
-rw-r--r--src/pluginlist.cpp2
-rw-r--r--src/profile.cpp2
-rw-r--r--src/report.cpp53
-rw-r--r--src/report.h38
-rw-r--r--src/selfupdater.cpp2
-rw-r--r--src/singleinstance.cpp3
-rw-r--r--src/spawn.cpp1
16 files changed, 26 insertions, 109 deletions
diff --git a/src/categories.cpp b/src/categories.cpp
index 1d5fdefe..0b201dcf 100644
--- a/src/categories.cpp
+++ b/src/categories.cpp
@@ -19,7 +19,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "categories.h"
#include <utility.h>
-#include "report.h"
+#include <report.h>
#include <gameinfo.h>
#include <QObject>
#include <QFile>
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index b5bc8148..81732f4d 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -18,7 +18,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "downloadmanager.h"
-#include "report.h"
#include "nxmurl.h"
#include "nexusinterface.h"
#include "nxmaccessmanager.h"
@@ -30,6 +29,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "selectiondialog.h"
#include "bbcode.h"
#include <utility.h>
+#include <report.h>
#include <QTimer>
#include <QFileInfo>
#include <QRegExp>
diff --git a/src/helper.cpp b/src/helper.cpp
index 1f072bd9..41784fe5 100644
--- a/src/helper.cpp
+++ b/src/helper.cpp
@@ -18,8 +18,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "helper.h"
-#include "report.h"
#include "utility.h"
+#include <report.h>
#include <LMCons.h>
#define WIN32_LEAN_AND_MEAN
@@ -27,6 +27,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDir>
+using MOBase::reportError;
+
namespace Helper {
diff --git a/src/logbuffer.cpp b/src/logbuffer.cpp
index fdfce6c5..b58ef1de 100644
--- a/src/logbuffer.cpp
+++ b/src/logbuffer.cpp
@@ -18,13 +18,16 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "logbuffer.h"
-#include "report.h"
+#include <report.h>
#include <QMutexLocker>
#include <QFile>
#include <QIcon>
#include <QDateTime>
#include <Windows.h>
+
+using MOBase::reportError;
+
QScopedPointer<LogBuffer> LogBuffer::s_Instance;
QMutex LogBuffer::s_Mutex;
diff --git a/src/main.cpp b/src/main.cpp
index 4d33b6ea..07210a23 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -45,7 +45,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <scopeguard.h>
#include <stdexcept>
#include "mainwindow.h"
-#include "report.h"
+#include <report.h>
#include "modlist.h"
#include "profile.h"
#include "gameinfo.h"
@@ -398,12 +398,12 @@ int main(int argc, char *argv[])
::GetEnvironmentVariable(TEXT("PATH"), oldPath.get(), offset);
}
- std::tstring newPath(oldPath.get());
- newPath += TEXT(";");
+ std::wstring newPath(oldPath.get());
+ newPath += L";";
newPath += ToWString(QDir::toNativeSeparators(QCoreApplication::applicationDirPath())).c_str();
- newPath += TEXT("\\dlls");
+ newPath += L"\\dlls";
- ::SetEnvironmentVariable(TEXT("PATH"), newPath.c_str());
+ ::SetEnvironmentVariableW(L"PATH", newPath.c_str());
}
registerMetaTypes();
diff --git a/src/moapplication.cpp b/src/moapplication.cpp
index df0fdd09..e25591d8 100644
--- a/src/moapplication.cpp
+++ b/src/moapplication.cpp
@@ -18,7 +18,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "moapplication.h"
-#include "report.h"
+#include <report.h>
#include <utility.h>
#include <appconfig.h>
#include <QFile>
@@ -36,6 +36,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDebug>
+using MOBase::reportError;
+
+
class ProxyStyle : public QProxyStyle {
public:
ProxyStyle(QStyle *baseStyle = 0)
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 866445a6..4475e021 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -19,7 +19,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "modlist.h"
-#include "report.h"
#include "messagedialog.h"
#include "installationtester.h"
#include "qtgroupingproxy.h"
@@ -27,6 +26,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <gameinfo.h>
#include <appconfig.h>
#include <utility.h>
+#include <report.h>
#include <QFileInfo>
#include <QDir>
#include <QDirIterator>
diff --git a/src/organizer.pro b/src/organizer.pro
index e2a0914b..340fbc72 100644
--- a/src/organizer.pro
+++ b/src/organizer.pro
@@ -31,7 +31,6 @@ SOURCES += \
savegameinfowidget.cpp \
savegamegamebryo.cpp \
savegame.cpp \
- report.cpp \
queryoverwritedialog.cpp \
profilesdialog.cpp \
profile.cpp \
@@ -111,7 +110,6 @@ HEADERS += \
savegameinfowidget.h \
savegamegamebyro.h \
savegame.h \
- report.h \
queryoverwritedialog.h \
profilesdialog.h \
profile.h \
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 5375cd3a..d8b4b951 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -7,7 +7,6 @@
#include "filedialogmemory.h"
#include "lockeddialog.h"
#include "modinfodialog.h"
-#include "report.h"
#include "spawn.h"
#include "safewritefile.h"
#include "syncoverwritedialog.h"
@@ -18,6 +17,7 @@
#include <scopeguard.h>
#include <utility.h>
#include <appconfig.h>
+#include <report.h>
#include <questionboxmemory.h>
#include <QNetworkInterface>
#include <QMessageBox>
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index a1e694b4..d3ffcdcb 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -18,7 +18,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "pluginlist.h"
-#include "report.h"
#include "inject.h"
#include "settings.h"
#include "safewritefile.h"
@@ -28,6 +27,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <gameinfo.h>
#include <iplugingame.h>
#include <espfile.h>
+#include <report.h>
#include <windows_error.h>
#include <QtDebug>
diff --git a/src/profile.cpp b/src/profile.cpp
index 09ac0713..e0adbbc6 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -18,7 +18,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "profile.h"
-#include "report.h"
#include "gameinfo.h"
#include "windows_error.h"
#include "modinfo.h"
@@ -28,6 +27,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <error_report.h>
#include <appconfig.h>
#include <iplugingame.h>
+#include <report.h>
#include <bsainvalidation.h>
#include <dataarchives.h>
#include <QMessageBox>
diff --git a/src/report.cpp b/src/report.cpp
deleted file mode 100644
index cca511a9..00000000
--- a/src/report.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "report.h"
-#include "utility.h"
-#include <QMessageBox>
-#include <QApplication>
-#include <Windows.h>
-
-
-using namespace MOBase;
-
-
-void reportError(QString message)
-{
- if (QApplication::topLevelWidgets().count() != 0) {
- QMessageBox messageBox(QMessageBox::Warning, QObject::tr("Error"), message, QMessageBox::Ok);
- messageBox.exec();
- } else {
- ::MessageBoxW(nullptr, ToWString(message).c_str(), ToWString(QObject::tr("Error")).c_str(), MB_ICONERROR | MB_OK);
- }
-}
-
-
-std::tstring toTString(const QString& source)
-{
-#ifdef UNICODE
- wchar_t* temp = new wchar_t[source.size() + 1];
- source.toWCharArray(temp);
- temp[source.size()] = '\0';
- std::tstring result(temp);
- delete[] temp;
- return result;
-#else // UNICODE
- return source.toAscii();
-#endif // UNICODE
-}
diff --git a/src/report.h b/src/report.h
deleted file mode 100644
index b319f9a0..00000000
--- a/src/report.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef REPORT_H
-#define REPORT_H
-
-#include <QString>
-#include <wchar.h>
-
-namespace std {
-#ifdef UNICODE
-typedef wstring tstring;
-#else
-typedef string tstring;
-#endif
-}
-
-void reportError(QString message);
-
-std::tstring toTString(const QString& source);
-
-#endif // REPORT_H
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index 659233f1..071ee51c 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -20,7 +20,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "selfupdater.h"
#include "utility.h"
#include "installationmanager.h"
-#include "report.h"
#include "messagedialog.h"
#include "downloadmanager.h"
#include "nexusinterface.h"
@@ -28,6 +27,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <versioninfo.h>
#include <gameinfo.h>
#include <skyriminfo.h>
+#include <report.h>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
diff --git a/src/singleinstance.cpp b/src/singleinstance.cpp
index dcb0fc78..89332f9b 100644
--- a/src/singleinstance.cpp
+++ b/src/singleinstance.cpp
@@ -18,13 +18,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "singleinstance.h"
-#include "report.h"
#include "utility.h"
+#include <report.h>
#include <QLocalSocket>
static const char s_Key[] = "mo-43d1a3ad-eeb0-4818-97c9-eda5216c29b5";
static const int s_Timeout = 5000;
+using MOBase::reportError;
SingleInstance::SingleInstance(bool forcePrimary, QObject *parent) :
QObject(parent), m_PrimaryInstance(false)
diff --git a/src/spawn.cpp b/src/spawn.cpp
index b1127df3..c79714bb 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -22,6 +22,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "utility.h"
#include <boost/scoped_array.hpp>
#include <gameinfo.h>
+#include <report.h>
#include <inject.h>
#include <Shellapi.h>
#include <appconfig.h>