summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-05-11 21:41:00 +0200
committerTannin <devnull@localhost>2015-05-11 21:41:00 +0200
commit183b5715609b309431d8040101635ef9ac0843bf (patch)
tree655c29284abc00a3cb0485f246b80b23c4d61995 /src
parent0f1271dd991ba9d67181114f75c80e14e8bfd596 (diff)
minor stuff
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp7
-rw-r--r--src/modinfo.cpp1
-rw-r--r--src/modlist.cpp7
-rw-r--r--src/shared/appconfig.h2
-rw-r--r--src/version.rc4
5 files changed, 13 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 135bdf8c..5a2ef6fd 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1681,8 +1681,11 @@ static HRESULT CreateShortcut(LPCWSTR targetFileName, LPCWSTR arguments,
result = shellLink->QueryInterface(IID_IPersistFile, (LPVOID*)&persistFile);
if (SUCCEEDED(result)) {
wchar_t linkFileNameW[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, linkFileName, -1, linkFileNameW, MAX_PATH);
- result = persistFile->Save(linkFileNameW, TRUE);
+ if (MultiByteToWideChar(CP_ACP, 0, linkFileName, -1, linkFileNameW, MAX_PATH) > 0) {
+ result = persistFile->Save(linkFileNameW, TRUE);
+ } else {
+ qCritical("failed to create link: %s", linkFileName);
+ }
persistFile->Release();
} else {
qCritical("failed to create IPersistFile instance");
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index ce51ecc6..923ad855 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -322,7 +322,6 @@ bool ModInfo::categorySet(int categoryID) const
return false;
}
-
void ModInfo::testValid()
{
m_Valid = false;
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 4475e021..8c1d56b7 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -760,13 +760,16 @@ bool ModList::dropURLs(const QMimeData *mimeData, int row, const QModelIndex &pa
QDir modDirectory(modInfo->absolutePath());
QDir gameDirectory(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::overwritePath()));
- unsigned int overwriteIndex = ModInfo::findMod([](ModInfo::Ptr mod) -> bool {
+ unsigned int overwriteIndex = ModInfo::findMod([] (ModInfo::Ptr mod) -> bool {
std::vector<ModInfo::EFlag> flags = mod->getFlags();
return std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end(); });
QString overwriteName = ModInfo::getByIndex(overwriteIndex)->name();
- foreach (const QUrl &url, mimeData->urls()) {
+ for (const QUrl &url : mimeData->urls()) {
+ if (!url.isLocalFile()) {
+ continue;
+ }
QString relativePath = gameDirectory.relativeFilePath(url.toLocalFile());
if (relativePath.startsWith("..")) {
qDebug("%s drop ignored", qPrintable(url.toLocalFile()));
diff --git a/src/shared/appconfig.h b/src/shared/appconfig.h
index 54544255..b32043e5 100644
--- a/src/shared/appconfig.h
+++ b/src/shared/appconfig.h
@@ -26,7 +26,7 @@ namespace AppConfig {
#define PARWSTRING wstring
-#define APPPARAM(partype, parid, value) partype parid ## ();
+#define APPPARAM(partype, parid, value) partype parid ();
#include "appconfig.inc"
namespace MOShared {
diff --git a/src/version.rc b/src/version.rc
index 3f7eaadf..65168b9c 100644
--- a/src/version.rc
+++ b/src/version.rc
@@ -1,7 +1,7 @@
#include "Winver.h"
-#define VER_FILEVERSION 1,3,4,0
-#define VER_FILEVERSION_STR "1,3,4,0\0"
+#define VER_FILEVERSION 1,3,5,0
+#define VER_FILEVERSION_STR "1,3,5,0\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION