summaryrefslogtreecommitdiff
path: root/src/report.cpp
diff options
context:
space:
mode:
authorTannin <Tannin@Miranda>2013-02-17 09:26:29 +0100
committerTannin <Tannin@Miranda>2013-02-17 09:26:29 +0100
commit6516a6b7c19713de28db7142612f1c095e541317 (patch)
tree06829bf7f82e1251a9e3db27185b7df90833bbc8 /src/report.cpp
parent5d1154c24e2475ed2b7ac248de27ab7b501a1e5e (diff)
- moved shared and uibase libraries to namespaces
- bugfix: the "fix mods" function was accessing the save game data incorrectly, causing a crash
Diffstat (limited to 'src/report.cpp')
-rw-r--r--src/report.cpp64
1 files changed, 34 insertions, 30 deletions
diff --git a/src/report.cpp b/src/report.cpp
index 6b379a1f..ca7e1dc9 100644
--- a/src/report.cpp
+++ b/src/report.cpp
@@ -17,33 +17,37 @@ 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>
-
-void reportError(QString message)
-{
- if (QApplication::topLevelWidgets().count() != 0) {
- QMessageBox messageBox(QMessageBox::Warning, QObject::tr("Error"), message, QMessageBox::Ok);
- messageBox.exec();
- } else {
- ::MessageBoxW(NULL, 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
-}
+#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(NULL, 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
+}