diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-09-27 15:39:13 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-09-27 15:39:13 +0200 |
commit | c51512f94036b7d13b98cb02b8e8c1e549e7b448 (patch) | |
tree | d44cc40472bf619cdb1a91238c02eaca4e6d0c78 /libraries/classparser/src | |
parent | 9a2d203c0d95e51ea02e3e62fef6289973777e84 (diff) | |
download | MultiMC-c51512f94036b7d13b98cb02b8e8c1e549e7b448.tar MultiMC-c51512f94036b7d13b98cb02b8e8c1e549e7b448.tar.gz MultiMC-c51512f94036b7d13b98cb02b8e8c1e549e7b448.tar.lz MultiMC-c51512f94036b7d13b98cb02b8e8c1e549e7b448.tar.xz MultiMC-c51512f94036b7d13b98cb02b8e8c1e549e7b448.zip |
NOISSUE use classparser for importing Legacy instances with undecided Minecraft versions
Diffstat (limited to 'libraries/classparser/src')
-rw-r--r-- | libraries/classparser/src/classparser.cpp (renamed from libraries/classparser/src/javautils.cpp) | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libraries/classparser/src/javautils.cpp b/libraries/classparser/src/classparser.cpp index 719032af..ebbdc887 100644 --- a/libraries/classparser/src/javautils.cpp +++ b/libraries/classparser/src/classparser.cpp @@ -15,17 +15,18 @@ * limitations under the License. */ #include "classfile.h" -#include "javautils.h" +#include "classparser.h" #include <QFile> #include <quazipfile.h> +#include <QDebug> -namespace javautils +namespace classparser { QString GetMinecraftJarVersion(QString jarName) { - QString version = MCVer_Unknown; + QString version; // check if minecraft.jar exists QFile jar(jarName); @@ -61,6 +62,7 @@ QString GetMinecraftJarVersion(QString jarName) if (constant.type != java::constant::j_string_data) continue; const std::string &str = constant.str_data; + qDebug() << QString::fromStdString(str); if (str.compare(0, 20, "Minecraft Minecraft ") == 0) { version = str.substr(20).data(); |