diff options
author | Andrew <forkk@forkk.net> | 2013-02-25 13:31:37 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-02-25 13:31:37 -0600 |
commit | 23474da17500b35bf4fb2a754021175361baab00 (patch) | |
tree | db2dda426ec4a91982f5f5539b08cc7c3bb1fd35 /libinstance | |
parent | 498225debdb22d83e591635dbd172cca12476279 (diff) | |
parent | 4fd5bdb01b27c99f16c9acf3c7ac13c7ea719800 (diff) | |
download | MultiMC-23474da17500b35bf4fb2a754021175361baab00.tar MultiMC-23474da17500b35bf4fb2a754021175361baab00.tar.gz MultiMC-23474da17500b35bf4fb2a754021175361baab00.tar.lz MultiMC-23474da17500b35bf4fb2a754021175361baab00.tar.xz MultiMC-23474da17500b35bf4fb2a754021175361baab00.zip |
Merge branch 'master' of git://github.com/peterix/MultiMC5
Conflicts:
CMakeLists.txt
main.cpp
Diffstat (limited to 'libinstance')
-rw-r--r-- | libinstance/include/instance.h | 3 | ||||
-rw-r--r-- | libinstance/src/instance.cpp | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/libinstance/include/instance.h b/libinstance/include/instance.h index b99d9953..fcf5fa97 100644 --- a/libinstance/include/instance.h +++ b/libinstance/include/instance.h @@ -305,4 +305,7 @@ private: QString m_rootDir; }; +// pointer for lazy people +typedef QSharedPointer<Instance> InstancePtr; + #endif // INSTANCE_H diff --git a/libinstance/src/instance.cpp b/libinstance/src/instance.cpp index b505ec86..ac0eca24 100644 --- a/libinstance/src/instance.cpp +++ b/libinstance/src/instance.cpp @@ -28,7 +28,7 @@ Instance::Instance(const QString &rootDir, QObject *parent) : QString Instance::id() const { - return QFileInfo(rootDir()).baseName(); + return QFileInfo(rootDir()).fileName(); } QString Instance::rootDir() const @@ -50,13 +50,9 @@ QString Instance::minecraftDir() const QFileInfo dotMCDir(PathCombine(rootDir(), ".minecraft")); if (dotMCDir.exists() && !mcDir.exists()) - { - return dotMCDir.path(); - } + return dotMCDir.filePath(); else - { - return mcDir.path(); - } + return mcDir.filePath(); } QString Instance::binDir() const |