summaryrefslogtreecommitdiffstats
path: root/gui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r--gui/mainwindow.cpp24
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)