diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-18 20:52:17 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-18 20:52:17 +0200 |
commit | c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d (patch) | |
tree | 7be301a5123e216a41646f9639ec887609497a87 /gui/mainwindow.cpp | |
parent | 253067c782955380bbf66ac0475dc954375b1ff4 (diff) | |
download | MultiMC-c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d.tar MultiMC-c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d.tar.gz MultiMC-c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d.tar.lz MultiMC-c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d.tar.xz MultiMC-c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d.zip |
Drag and Drop, mod management.
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r-- | gui/mainwindow.cpp | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 5087b38f..ba7e135c 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -64,11 +64,6 @@ #include "instancedelegate.h" #include "IconPickerDialog.h" -// Opens the given file in the default application. -// TODO: Move this somewhere. -void openFileInDefaultProgram ( QString filename ); -void openDirInDefaultProgram ( QString dirpath, bool ensureExists = false ); - MainWindow::MainWindow ( QWidget *parent ) : QMainWindow ( parent ), ui ( new Ui::MainWindow ), @@ -376,7 +371,8 @@ void MainWindow::on_actionEditInstMods_triggered() if (inst) { auto dialog = inst->createModEditDialog(this); - dialog->exec(); + if(dialog) + dialog->exec(); } } @@ -537,22 +533,6 @@ void MainWindow::openWebPage ( QUrl url ) browser->exec(); } -void openDirInDefaultProgram ( QString path, bool ensureExists ) -{ - QDir parentPath; - QDir dir( path ); - if(!dir.exists()) - { - parentPath.mkpath(dir.absolutePath()); - } - QDesktopServices::openUrl ( "file:///" + dir.absolutePath() ); -} - -void openFileInDefaultProgram ( QString filename ) -{ - QDesktopServices::openUrl ( "file:///" + QFileInfo ( filename ).absolutePath() ); -} - void MainWindow::on_actionChangeInstMCVersion_triggered() { if (view->selectionModel()->selectedIndexes().count() < 1) |