diff options
| author | Tannin <sherb@gmx.net> | 2016-06-02 19:45:04 +0200 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2016-06-02 19:45:04 +0200 |
| commit | 4f1bb369330a0728e11a83bd334f8904b1c2ecc2 (patch) | |
| tree | c16da01e205144573fd0a94f93e3f7693ba28b00 /src/installationmanager.cpp | |
| parent | cbdea13a9c079f3de114cb96418b500e0f1d297a (diff) | |
fixed some filename/modname handling for names received from nexus
Diffstat (limited to 'src/installationmanager.cpp')
| -rw-r--r-- | src/installationmanager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index bf5ee91a..1c9d8a42 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -48,6 +48,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QDateTime>
#include <QDirIterator>
#include <QDebug>
+#include <QTextDocument>
#include <Shellapi.h>
@@ -669,7 +670,9 @@ bool InstallationManager::install(const QString &fileName, if (QFile(metaName).exists()) {
QSettings metaFile(metaName, QSettings::IniFormat);
modID = metaFile.value("modID", 0).toInt();
- modName.update(metaFile.value("name", "").toString(), GUESS_FALLBACK);
+ QTextDocument doc;
+ doc.setHtml(metaFile.value("name", "").toString());
+ modName.update(doc.toPlainText(), GUESS_FALLBACK);
modName.update(metaFile.value("modName", "").toString(), GUESS_META);
version = metaFile.value("version", "").toString();
@@ -688,12 +691,13 @@ bool InstallationManager::install(const QString &fileName, { // guess the mod name and mod if from the file name if there was no meta information
QString guessedModName;
int guessedModID = modID;
- NexusInterface::interpretNexusFileName(QFileInfo(fileName).baseName(), guessedModName, guessedModID, false);
+ NexusInterface::interpretNexusFileName(QFileInfo(fileName).fileName(), guessedModName, guessedModID, false);
if ((modID == 0) && (guessedModID != -1)) {
modID = guessedModID;
} else if (modID != guessedModID) {
qDebug("passed mod id: %d, guessed id: %d", modID, guessedModID);
}
+
modName.update(guessedModName, GUESS_GOOD);
}
|
